From: dmaus Date: Sat, 17 Apr 2010 14:45:19 +0000 (+0000) Subject: Remove usage of kill file to adjust message counter. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cb35efbd915819f1814cbb5fdc9cf22cfb95750;p=elisp%2Fwanderlust.git Remove usage of kill file to adjust message counter. The kill file contains cons' with ranges of UIDs that are considered 'killed', i.e. hidden from user's view. But these ranges cannot be used to adjust counter of total messages in a IMAP4 mailbox: A range of (1 . 100) does not necessarily refer to 100 messages. E.g. if there are 100 messages in the mailbox with UID ranging from 1 to 100 and you delete the first message, the range (1 . 100) refers to 99 messages. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 4d5a082..bf7c08c 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -2,6 +2,8 @@ * elmo-imap4.el (elmo-imap4-mailbox-size-update-maybe): Build list of expunged messages only when response contains expunge. + (elmo-imap4-folder-diff-plugged): Removed usage of kill file to + adjust message counter. 2010-04-16 David Maus diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index 91792a6..3ad7574 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -2542,7 +2542,7 @@ If optional argument REMOVE is non-nil, remove FLAG." (defsubst elmo-imap4-folder-diff-plugged (folder) (let ((session (elmo-imap4-get-session folder)) - messages new unread response killed uidnext) + messages new unread response) ;;; (elmo-imap4-commit spec) (with-current-buffer (elmo-network-session-buffer session) (setq elmo-imap4-status-callback nil) @@ -2558,18 +2558,9 @@ If optional argument REMOVE is non-nil, remove FLAG." (elmo-imap4-mailbox (elmo-imap4-folder-mailbox-internal folder)) - " (recent unseen messages uidnext)"))) + " (recent unseen messages)"))) (setq response (elmo-imap4-response-value response 'status)) (setq messages (elmo-imap4-response-value response 'messages)) - (setq uidnext (elmo-imap4-response-value response 'uidnext)) - (setq killed (elmo-msgdb-killed-list-load (elmo-folder-msgdb-path folder))) - ;; - (when killed - (when (and (consp (car killed)) - (eq (car (car killed)) 1)) - (setq messages (- uidnext (cdr (car killed)) 1))) - (setq messages (- messages - (elmo-msgdb-killed-list-length (cdr killed))))) (setq new (elmo-imap4-response-value response 'recent) unread (elmo-imap4-response-value response 'unseen)) (if (< unread new) (setq new unread))