From: dmaus Date: Fri, 2 Jul 2010 18:57:29 +0000 (+0000) Subject: 2010-07-02 David Maus X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a587fc67ae80752741184d8349934c6573c6b496;p=elisp%2Fwanderlust.git 2010-07-02 David Maus * elmo-imap4.el (elmo-server-diff-async): Remove. Unused luna method. (elmo-imap4-folder-status-plugged): Close mailbox before calling STATUS if it is selected. If `elmo-imap4-use-select-to-update-status' is non-nil, do the opposite. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 0397e09..d66d637 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,12 @@ +2010-07-02 David Maus + + * elmo-imap4.el (elmo-server-diff-async): Remove. Unused luna + method. + (elmo-imap4-folder-status-plugged): Close mailbox before calling + STATUS if it is selected. If + `elmo-imap4-use-select-to-update-status' is non-nil, do the + opposite. + 2010-05-18 David Maus * elmo-imap4.el (elmo-imap4-mailbox-selected-p): Fix typo. diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index 6dfb7e3..2167656 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -1290,22 +1290,6 @@ If CHOP-LENGTH is not specified, message set is not chopped." (elmo-imap4-folder-mailbox-internal folder)) " (recent unseen messages)")))) -(luna-define-method elmo-server-diff-async ((folder elmo-imap4-folder)) - (let ((session (elmo-imap4-get-session folder))) -;;; ;; commit. -;;; (elmo-imap4-commit spec) - (with-current-buffer (elmo-network-session-buffer session) - (setq elmo-imap4-status-callback - 'elmo-imap4-server-diff-async-callback-1) - (setq elmo-imap4-status-callback-data - elmo-imap4-server-diff-async-callback-data)) - (elmo-imap4-send-command session - (list - "status " - (elmo-imap4-mailbox - (elmo-imap4-folder-mailbox-internal folder)) - " (recent unseen messages)")))) - ;;; IMAP parser. (defvar elmo-imap4-server-eol "\r\n" @@ -1998,13 +1982,26 @@ Return nil if no complete line has arrived." (elmo-imap4-folder-status-plugged folder)) (defun elmo-imap4-folder-status-plugged (folder) - (let ((session (elmo-imap4-get-session folder)) - (killed (elmo-msgdb-killed-list-load + (let* ((session (elmo-imap4-get-session folder)) + (killed (elmo-msgdb-killed-list-load (elmo-folder-msgdb-path folder))) - status) + (selected (elmo-imap4-mailbox-selected-p + (elmo-imap4-folder-mailbox-internal folder) session)) + status) (with-current-buffer (elmo-network-session-buffer session) (setq elmo-imap4-status-callback nil) (setq elmo-imap4-status-callback-data nil)) + (cond + ((and selected (not elmo-imap4-use-select-to-update-status)) + (elmo-imap4-send-command-wait session "close") + (elmo-imap4-session-set-current-mailbox-internal session nil) + (elmo-imap4-session-set-current-mailbox-size-internal session nil)) + ((and (not selected) elmo-imap4-use-select-to-update-status) + ;; This will result in a violation of RFC3501: calling STATUS on + ;; a selected mailbox. + (elmo-imap4-session-select-mailbox + session + (elmo-imap4-folder-mailbox-internal folder)))) (setq status (elmo-imap4-response-value (elmo-imap4-send-command-wait session