+2002-09-16 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * elmo-msgdb.el (elmo-msgdb-seen-list): Use `elmo-msgdb-unread-marks'
+
+ * elmo-imap4.el (elmo-imap4-fetch-callback-1-subr): Set answered mark.
+ (elmo-imap4-folder-list-any-plugged): New function.
+ (elmo-imap4-search-internal-primitive): Use it.
+
+ * elmo-filter.el (elmo-folder-check): Synchronize original folder
+ only when require-msgdb slot is non-nil.
+ (elmo-folder-close): Clear target folder's msgdb.
+
2002-09-13 Yuuichi Teranishi <teranisi@gohome.org>
* elmo-pop3.el (elmo-folder-msgdb-create): Follow the API change.
(luna-call-next-method))
(luna-define-method elmo-folder-check ((folder elmo-filter-folder))
- (elmo-folder-synchronize (elmo-filter-folder-target-internal folder)))
+ (if (elmo-filter-folder-require-msgdb-internal folder)
+ (elmo-folder-synchronize (elmo-filter-folder-target-internal folder))))
(luna-define-method elmo-folder-close-internal ((folder elmo-filter-folder))
(elmo-folder-close-internal (elmo-filter-folder-target-internal folder)))
-(luna-define-method elmo-folder-close :around ((folder elmo-filter-folder))
- ;; Save target msgdb if it is used.
+(luna-define-method elmo-folder-close :after ((folder elmo-filter-folder))
+ ;; Clear target msgdb if it is used.
(if (elmo-filter-folder-require-msgdb-internal folder)
- (elmo-folder-close (elmo-filter-folder-target-internal folder)))
- (luna-call-next-method))
+ (elmo-folder-set-msgdb-internal (elmo-filter-folder-target-internal
+ folder) nil)))
(luna-define-method elmo-folder-commit :around ((folder elmo-filter-folder))
;; Save target msgdb if it is used.
elmo-imap4-seen-messages)))
(setq mark (or (if (elmo-file-cache-status
(elmo-file-cache-get (car entity)))
+ ;; cached.
+ (if (member "\\Answered" flags)
+ elmo-msgdb-answered-cached-mark
+ (if (or seen
+ (and use-flag
+ (member "\\Seen" flags)))
+ nil
+ elmo-msgdb-unread-cached-mark))
+ (if (member "\\Answered" flags)
+ elmo-msgdb-answered-uncached-mark
(if (or seen
(and use-flag
(member "\\Seen" flags)))
- nil
- elmo-msgdb-unread-cached-mark)
- (if (or seen
- (and use-flag
- (member "\\Seen" flags)))
- (if elmo-imap4-use-cache
- elmo-msgdb-read-uncached-mark)
- elmo-msgdb-new-mark)))))
+ (if elmo-imap4-use-cache
+ elmo-msgdb-read-uncached-mark)
+ elmo-msgdb-new-mark))))))
(setq elmo-imap4-current-msgdb
(elmo-msgdb-append
elmo-imap4-current-msgdb
((folder elmo-imap4-folder))
(elmo-imap4-list folder "answered"))
+(defun elmo-imap4-folder-list-any-plugged (folder)
+ (elmo-imap4-list folder "or answered or unseen flagged"))
+
(luna-define-method elmo-folder-use-flag-p ((folder elmo-imap4-folder))
(not (string-match elmo-imap4-disuse-server-flag-mailbox-regexp
(elmo-imap4-folder-mailbox-internal folder))))
((string= "important" (elmo-filter-value filter))
(elmo-folder-list-importants folder))
((string= "answered" (elmo-filter-value filter))
- (elmo-folder-list-answereds folder))))
+ (elmo-folder-list-answereds folder))
+ ((string= "any" (elmo-filter-value filter))
+ (elmo-imap4-folder-list-any-plugged folder))))
((or (string= "since" search-key)
(string= "before" search-key))
(setq search-key (concat "sent" search-key)
(if (setq mark (elmo-msgdb-get-mark
msgdb
(elmo-msgdb-overview-entity-get-number (car ov))))
- (if (and mark (member mark (list elmo-msgdb-important-mark
- elmo-msgdb-read-uncached-mark)))
+ (if (and mark (not (member mark
+ (elmo-msgdb-unread-marks))))
(setq seen-list (cons
(elmo-msgdb-overview-entity-get-id (car ov))
seen-list)))