X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=elmo%2Felmo-pipe.el;h=352c0edd7c16ce2f9e19a6d93aebaeb30939cc4a;hb=10518221da70c6e7ffc66352ee6a3e1036bd5133;hp=fd0fb7e277eda0d8cda37adf373de57d56764192;hpb=85b5f594b70fad59980ac2f404404c712be02435;p=elisp%2Fwanderlust.git diff --git a/elmo/elmo-pipe.el b/elmo/elmo-pipe.el index fd0fb7e..352c0ed 100644 --- a/elmo/elmo-pipe.el +++ b/elmo/elmo-pipe.el @@ -31,12 +31,6 @@ (require 'elmo-msgdb) -(defsubst elmo-pipe-spec-src (spec) - (nth 1 spec)) - -(defsubst elmo-pipe-spec-dst (spec) - (nth 2 spec)) - (defalias 'elmo-pipe-msgdb-create 'elmo-pipe-msgdb-create-as-numlist) (defun elmo-pipe-msgdb-create-as-numlist (spec numlist new-mark already-mark @@ -52,10 +46,10 @@ (defun elmo-pipe-append-msg (spec string &optional msg no-see) (elmo-append-msg (elmo-pipe-spec-dst spec) string)) -(defun elmo-pipe-read-msg (spec number outbuf) +(defun elmo-pipe-read-msg (spec number outbuf &optional msgdb unread) (elmo-call-func (elmo-pipe-spec-dst spec) "read-msg" - number outbuf)) + number outbuf msgdb unread)) (defun elmo-pipe-delete-msgs (spec msgs) (elmo-delete-msgs (elmo-pipe-spec-dst spec) msgs)) @@ -63,17 +57,17 @@ (defvar elmo-pipe-drained-hook nil "A hook called when the pipe is flushed.") (defun elmo-pipe-drain (src dst) - (let ((msgdb (elmo-msgdb-load src)) - elmo-nntp-use-cache - elmo-imap4-use-cache - elmo-pop3-use-cache ; Inhibit caching while moving messages. + "Move all messages of SRC to DST." + (let ((elmo-inhibit-read-cache t); Inhibit caching while moving messages. elmo-pop3-use-uidl) ; No need to use UIDL (message "Checking %s..." src) - (elmo-move-msgs src (elmo-list-folder src) dst msgdb) - ;; Don't save msgdb here. - ;; Because summary view of original folder is not updated yet. - ;; (elmo-msgdb-save src msgdb) - (elmo-commit src) + (let ((srclist (elmo-list-folder src)) + (msgdb (elmo-msgdb-load src))) + (elmo-move-msgs src srclist dst msgdb) + ;; Don't save msgdb here. + ;; Because summary view of original folder is not updated yet. + ;; (elmo-msgdb-save src msgdb) + (elmo-commit src)) (run-hooks 'elmo-pipe-drained-hook))) (defun elmo-pipe-list-folder (spec)