From: yoichi Date: Thu, 31 Jan 2008 00:50:16 +0000 (+0000) Subject: * elmo-imap4.el (elmo-folder-list-messages-plugged): Don't include X-Git-Tag: wl-2_15_6-fixes~65 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=18645a682f81dd71e6d6ee6e4286f3960fd28a13;p=elisp%2Fwanderlust.git * elmo-imap4.el (elmo-folder-list-messages-plugged): Don't include messages with \Deleted flag. (elmo-folder-delete-messages-plugged): Don't send expunge command if there are messages with \Deleted flag. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 05904f7..752b5c9 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,10 @@ +2008-01-31 Yoichi NAKAYAMA + + * elmo-imap4.el (elmo-folder-list-messages-plugged): Don't include + messages with \Deleted flag. + (elmo-folder-delete-messages-plugged): Don't send expunge command + if there are messages with \Deleted flag. + 2007-04-24 Yoichi NAKAYAMA * elmo-pop3.el (elmo-pop3-auth-apop): Use more strict regexp. diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index 451066a..e650516 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -1942,15 +1942,17 @@ Return nil if no complete line has arrived." &optional enable-killed) (elmo-imap4-list folder - (let ((killed - (elmo-folder-killed-list-internal - folder))) - (if (and killed - (eq (length killed) 1) - (consp (car killed)) - (eq (car (car killed)) 1)) - (format "uid %d:*" (cdr (car killed))) - "all")))) + (concat + (let ((killed + (elmo-folder-killed-list-internal + folder))) + (if (and killed + (eq (length killed) 1) + (consp (car killed)) + (eq (car (car killed)) 1)) + (format "uid %d:*" (cdr (car killed))) + "all")) + " undeleted"))) (luna-define-method elmo-folder-list-flagged-plugged ((folder elmo-imap4-folder) flag) @@ -2192,13 +2194,19 @@ If optional argument REMOVE is non-nil, remove FLAG." (luna-define-method elmo-folder-delete-messages-plugged ((folder elmo-imap4-folder) numbers) - (let ((session (elmo-imap4-get-session folder))) + (let ((session (elmo-imap4-get-session folder)) + (expunge + (or (null (elmo-imap4-list folder "deleted")) + (y-or-n-p + "There's hidden deleted messages, expunge anyway?")))) (elmo-imap4-session-select-mailbox session (elmo-imap4-folder-mailbox-internal folder)) (unless (elmo-imap4-set-flag folder numbers "\\Deleted") (error "Failed to set deleted flag")) - (elmo-imap4-send-command session "expunge"))) + (when expunge + (elmo-imap4-send-command session "expunge")) + t)) (defmacro elmo-imap4-detect-search-charset (string) (` (with-temp-buffer