From: teranisi Date: Sat, 19 Feb 2005 03:07:33 +0000 (+0000) Subject: Synch up with main trunk. X-Git-Tag: wl-2_12_1~5 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26b01a5d8e2959e6bee55a0d62abc23f109e6e2f;p=elisp%2Fwanderlust.git Synch up with main trunk. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 659aeaa..ee445e1 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,44 @@ +2005-02-19 Yuuichi Teranishi + + * elmo-maildir.el (elmo-folder-append-messages): Fix the problem + that only the first flag is used. + +2005-02-17 ARISAWA Akihiro + + * elmo-shimbun.el (elmo-folder-exists-p): Use `shimbun-group-p' + if available. + +2005-02-17 Hiroya Murata + + * elmo-imap4.el (elmo-imap4-flags-to-imap): Preserve argument + `flags'. + +2005-02-16 Hiroya Murata + + * elmo-filter.el (elmo-message-set-cached): Call + `elmo-folder-notify-event' with event `cache-changed'. + + * elmo-multi.el (elmo-message-set-cached): Ditto. + + * elmo-pipe.el (elmo-message-set-cached): Ditto. + +2005-02-16 Yoichi NAKAYAMA + + * elmo.el (elmo-folder-encache): Abolish. + +2005-02-16 Yuuichi Teranishi + + * elmo-dop.el (elmo-folder-delete-messages-dop): Delete 'Append' queue. + (elmo-folder-next-message-number-dop): Return appropriate negative + integer. + +2005-02-15 Yoichi NAKAYAMA + + * elmo-dop.el (elmo-dop-queue-flush): Remove files in dop spool on + clearing pending operations. + (elmo-folder-next-message-number-dop): Return appropriate negative + integer. + 2005-02-11 Hiroya Murata * elmo-multi.el (elmo-multi-folder-diff): Fixed problem when the diff --git a/elmo/elmo-dop.el b/elmo/elmo-dop.el index fcd6015..73d7fc6 100644 --- a/elmo/elmo-dop.el +++ b/elmo/elmo-dop.el @@ -157,6 +157,12 @@ Saved queue is old version(2.6). Clear all pending operations? ") (not elmo-dop-flush-confirm) t) (progn (while queue + (when (eq (elmo-dop-queue-method (car queue)) + 'elmo-folder-append-buffer-dop-delayed) + (elmo-folder-delete-messages + (elmo-dop-spool-folder + (elmo-make-folder (elmo-dop-queue-fname (car queue)))) + (list (nth 1 (elmo-dop-queue-arguments (car queue)))))) (setq elmo-dop-queue (delq (car queue) elmo-dop-queue)) (setq queue (cdr queue))) (message "Pending operations are cleared.") @@ -247,8 +253,18 @@ FOLDER is the folder structure." queue) (dolist (number numbers) (if (< number 0) - (elmo-folder-delete-messages spool-folder - (list (abs number))) ; delete from queue + (progn + ;; delete from queue + (elmo-folder-delete-messages spool-folder + (list (abs number))) + (dolist (queue elmo-dop-queue) + (when (and (eq (elmo-dop-queue-fname queue) + (elmo-folder-name-internal folder)) + (eq (elmo-dop-queue-method queue) + 'elmo-folder-append-buffer-dop-delayed) + (eq (abs number) + (nth 1 (elmo-dop-queue-arguments queue)))) + (setq elmo-dop-queue (delq queue elmo-dop-queue))))) (setq queue (cons number queue)))) (when queue (elmo-dop-queue-append folder 'elmo-folder-delete-messages-dop-delayed @@ -311,15 +327,10 @@ FOLDER is the folder structure." (cons (+ max-num spool-length) (+ (length number-list) spool-length)))) (defun elmo-folder-next-message-number-dop (folder) - (let ((number-list (elmo-folder-list-messages folder nil 'in-msgdb)) - (spool-folder (elmo-dop-spool-folder folder)) - spool-length - max-num) - (setq spool-length (or (if (elmo-folder-exists-p spool-folder) - (car (elmo-folder-status spool-folder))) - 0)) - (setq max-num (if number-list (apply #'max number-list) 0)) - (+ max-num spool-length))) + (let ((spool-folder (elmo-dop-spool-folder folder))) + (- (+ 1 (elmo-max-of-list (or (elmo-folder-list-messages + spool-folder) + '(0))))))) ;;; Delayed operation (executed at online status). (defun elmo-folder-append-buffer-dop-delayed (folder flag number set-number) diff --git a/elmo/elmo-filter.el b/elmo/elmo-filter.el index 7eb00be..efaa0b4 100644 --- a/elmo/elmo-filter.el +++ b/elmo/elmo-filter.el @@ -345,7 +345,8 @@ (luna-define-method elmo-message-set-cached ((folder elmo-filter-folder) number cached) (elmo-message-set-cached - (elmo-filter-folder-target-internal folder) number cached)) + (elmo-filter-folder-target-internal folder) number cached) + (elmo-folder-notify-event folder 'cache-changed number)) (luna-define-method elmo-message-number ((folder elmo-filter-folder) message-id) diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index c3b88af..b59cfc2 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -2582,13 +2582,14 @@ If optional argument REMOVE is non-nil, remove FLAG." (defun elmo-imap4-flags-to-imap (flags) "Convert FLAGS to the IMAP flag string." - (let ((imap-flag (if (not (memq 'unread flags)) "\\Seen")) - (flags (delq 'read (delq 'cached (delq 'unread flags)))) - spec) + (let ((imap-flag (if (not (memq 'unread flags)) "\\Seen"))) (dolist (flag flags) - (setq imap-flag (concat imap-flag (if imap-flag " ") - (or (car (cdr (assq flag elmo-imap4-flag-specs))) - (capitalize (symbol-name flag)))))) + (unless (memq flag '(new read unread cached)) + (setq imap-flag + (concat imap-flag + (if imap-flag " ") + (or (car (cdr (assq flag elmo-imap4-flag-specs))) + (capitalize (symbol-name flag))))))) imap-flag)) (luna-define-method elmo-folder-append-buffer diff --git a/elmo/elmo-maildir.el b/elmo/elmo-maildir.el index c9347e2..de9051d 100644 --- a/elmo/elmo-maildir.el +++ b/elmo/elmo-maildir.el @@ -496,7 +496,7 @@ file name for maildir directories." (succeeds numbers) filename flags id) (dolist (number numbers) - (setq flags (elmo-message-flags src-folder (car numbers)) + (setq flags (elmo-message-flags src-folder number)) filename (elmo-maildir-temporal-filename dir)) (elmo-copy-file (elmo-message-file-name src-folder number) @@ -508,7 +508,7 @@ file name for maildir directories." dir)) ;; src folder's msgdb is loaded. (when (setq id (and src-msgdb-exists - (elmo-message-field src-folder (car numbers) + (elmo-message-field src-folder number 'message-id))) (elmo-flag-table-set table id flags)) (elmo-progress-notify 'elmo-folder-move-messages)) diff --git a/elmo/elmo-multi.el b/elmo/elmo-multi.el index b4700b3..2a13b79 100644 --- a/elmo/elmo-multi.el +++ b/elmo/elmo-multi.el @@ -144,7 +144,8 @@ (luna-define-method elmo-message-set-cached ((folder elmo-multi-folder) number cached) (let ((pair (elmo-multi-real-folder-number folder number))) - (elmo-message-set-cached (car pair) (cdr pair) cached))) + (elmo-message-set-cached (car pair) (cdr pair) cached)) + (elmo-folder-notify-event folder 'cache-changed number)) (luna-define-method elmo-find-fetch-strategy ((folder elmo-multi-folder) number diff --git a/elmo/elmo-pipe.el b/elmo/elmo-pipe.el index a62eaf6..ca07964 100644 --- a/elmo/elmo-pipe.el +++ b/elmo/elmo-pipe.el @@ -363,7 +363,8 @@ (luna-define-method elmo-message-set-cached ((folder elmo-pipe-folder) number cached) (elmo-message-set-cached (elmo-pipe-folder-dst-internal folder) - number cached)) + number cached) + (elmo-folder-notify-event folder 'cache-changed number)) (luna-define-method elmo-find-fetch-strategy ((folder elmo-pipe-folder) number diff --git a/elmo/elmo-shimbun.el b/elmo/elmo-shimbun.el index 982e3c7..677cbe0 100644 --- a/elmo/elmo-shimbun.el +++ b/elmo/elmo-shimbun.el @@ -514,11 +514,12 @@ If it is the symbol `all', update overview for all shimbun folders." (luna-define-method elmo-folder-exists-p ((folder elmo-shimbun-folder)) (if (elmo-shimbun-folder-group-internal folder) - (progn + (if (fboundp 'shimbun-group-p) + (shimbun-group-p (elmo-shimbun-folder-shimbun-internal folder) + (elmo-shimbun-folder-group-internal folder)) (member (elmo-shimbun-folder-group-internal folder) - (shimbun-groups (elmo-shimbun-folder-shimbun-internal - folder)))) + (shimbun-groups (elmo-shimbun-folder-shimbun-internal folder)))) t)) (luna-define-method elmo-folder-delete-messages ((folder elmo-shimbun-folder) diff --git a/elmo/elmo.el b/elmo/elmo.el index 58f65b6..b44ed97 100644 --- a/elmo/elmo.el +++ b/elmo/elmo.el @@ -592,12 +592,6 @@ CACHE-PATH is the cache path to be used as a message cache file." ((folder elmo-folder) &optional visible-only) t) -(defun elmo-folder-encache (folder numbers &optional unread) - "Encache messages in the FOLDER with NUMBERS. -If UNREAD is non-nil, messages are not flaged as read." - (dolist (number numbers) - (elmo-message-encache folder number unread))) - (luna-define-generic elmo-message-encache (folder number &optional read) "Encache message in the FOLDER with NUMBER. If READ is non-nil, message is flaged as read.")