From: okada Date: Tue, 10 Oct 2000 03:54:02 +0000 (+0000) Subject: * wl-summary.el (wl-summary-sync-force-update): Append queue X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ed171914c6da44a548abd098b7699c05c68f362;p=elisp%2Fwanderlust.git * wl-summary.el (wl-summary-sync-force-update): Append queue `mark-as-read'if unplugged. * wl-summary.el (wl-summary-refile-subr): Fix. * elmo-dop.el (elmo-dop-flush-pending-append-operations): Add no-see. (elmo-dop-call-func-on-msgs): Don't delete appends from msgs. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 4ade1a5..efa8788 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2000-10-10 Kenichi OKADA + + * elmo-dop.el (elmo-dop-flush-pending-append-operations): Add no-see. + (elmo-dop-call-func-on-msgs): Don't delete appends from msgs. + 2000-10-10 Yuuichi Teranishi * elmo-multi.el (elmo-multi-split-mark-alist): Copy and sort alist @@ -134,7 +139,7 @@ (elmo-imap4-get-spec): Take into account `elmo-imap4-stream-type-alist'. -2000-10-06 Kenichi OKADA +2000-10-06 Kenichi OKADA * elmo-nntp.el (elmo-nntp-list-folders): Fix for `-/' (elmo-nntp-list-folders-get-cache): Ditto. @@ -343,13 +348,13 @@ (elmo-imap4-string-1): Renamed from `elmo-imap4-string-subr'. (elmo-imap4-astring-1): Renamed from `elmo-imap4-astring-subr'. -2000-09-15 Kenichi OKADA +2000-09-15 Kenichi OKADA * elmo-archive.el (elmo-archive-list-folder-subr): Fix. (elmo-archive-list-folder): Fix. (elmo-archive-max-of-folder): Fix. -2000-09-15 Kenichi OKADA +2000-09-15 Kenichi OKADA * elmo-localdir.el (elmo-localdir-copy-msgs): Use `elmo-localdir-max-of-folder' instead of 'elmo-localdir-list-folder-subr'. @@ -574,7 +579,7 @@ (elmo-imap4-error-message): Abolish (elmo-imap4-list-folders): Don't quote lambda. (elmo-imap4-create-msgdb-from-overview-string): Ditto. - (elmo-imap4-parse-namespace): Ditto. + (elmo-imap4-parse-namespace): Ditto. (elmo-imap4-open-connection): Rewrite. (elmo-imap4-open-connection-1): Simplified (authenticate only). (elmo-imap4-get-connection): Abolish local variable `result'. @@ -648,12 +653,12 @@ (elmo-imap4-auth-digest-md5): New function. (elmo-imap4-login): New function. -2000-08-12 Kenichi OKADA +2000-08-12 Kenichi OKADA * elmo-maildir.el (elmo-maildir-delete-folder): Set argument of the function `error'. -2000-08-12 Kenichi OKADA +2000-08-12 Kenichi OKADA * elmo-pop3.el (elmo-pop3-get-connection): Add `signal'. @@ -666,11 +671,11 @@ * elmo-imap4.el (elmo-imap4-parse-overview-string): In regexps for server responses, quote `*' regardless of where it appears. -2000-08-03 Kenichi OKADA +2000-08-03 Kenichi OKADA * elmo-maildir.el (elmo-maildir-commit): New alias. -2000-08-03 Kenichi OKADA +2000-08-03 Kenichi OKADA * elmo-util.el (elmo-display-progress): Use `progress-feedback-with-label'. @@ -769,7 +774,7 @@ the local variable `folder' to `mailbox'. Rename the argument `fld' to `folder'. -2000-07-20 Kenichi OKADA +2000-07-20 Kenichi OKADA * elmo-pop3.el (elmo-pop3-commit): Do nothing when unplugged. * elmo-imap4.el (elmo-imap4-commit): Ditto. @@ -1038,7 +1043,7 @@ (elmo-msgdb-overview-entity-get-subject): Ditto. * elmo-vars.el (elmo-use-decoded-cache): New variable. -2000-05-10 Kenichi OKADA +2000-05-10 Kenichi OKADA * elmo-utils.el (elmo-get-passwd): Set timeout of password. (elmo-remove-passwd): Fill password with 0 before erase. diff --git a/elmo/elmo-dop.el b/elmo/elmo-dop.el index 9d25d41..5ef77dc 100644 --- a/elmo/elmo-dop.el +++ b/elmo/elmo-dop.el @@ -315,10 +315,10 @@ even an operation concerns the unplugged folder." matched) (if (eq (elmo-folder-get-type folder) 'imap4) (progn - (while append-list - (if (setq matched (car (rassoc (car append-list) number-alist))) - (setq msgs (delete matched msgs))) - (setq append-list (cdr append-list))) +;; (while append-list +;; (if (setq matched (car (rassoc (car append-list) number-alist))) +;; (setq msgs (delete matched msgs))) +;; (setq append-list (cdr append-list))) (if msgs (elmo-dop-queue-append folder func-name msgs))) ;; maildir... XXX hard coding..... @@ -379,7 +379,7 @@ even an operation concerns the unplugged folder." (when resume ;; Resume msgdb changed by elmo-dop-msgdb-create. (let* ((resumed-list (elmo-dop-append-list-load folder t)) - (number-alist (elmo-msgdb-number-load + (number-alist (elmo-msgdb-number-load (elmo-msgdb-expand-path folder))) (appendings append-list) pair dels) @@ -390,22 +390,26 @@ even an operation concerns the unplugged folder." (setq appendings (cdr appendings))) (elmo-dop-append-list-save folder resumed-list t))) (while appendings - (setq failure nil) - (setq file-string (elmo-get-file-string ; message string - (elmo-cache-get-path - (car appendings)))) - (when file-string - (condition-case () - (elmo-append-msg folder file-string (car appendings)) - (quit (setq failure t)) - (error (setq failure t))) - (setq i (+ 1 i)) - (message (format "Appending queued messages...%d" i)) - (if failure - (elmo-append-msg elmo-lost+found-folder - file-string (car appendings)))) - (elmo-dop-unlock-message (car appendings)) - (setq appendings (cdr appendings))) + (let* ((seen-list (elmo-msgdb-seen-load + (elmo-msgdb-expand-path folder)))) + (setq failure nil) + (setq file-string (elmo-get-file-string ; message string + (elmo-cache-get-path + (car appendings)))) + (when file-string + (condition-case () + (elmo-append-msg folder file-string (car appendings) nil + (not (member (car appendings) seen-list))) + (quit (setq failure t)) + (error (setq failure t))) + (setq i (+ 1 i)) + (message (format "Appending queued messages...%d" i)) + (if failure + (elmo-append-msg elmo-lost+found-folder + file-string (car appendings) nil + (not (member (car appendings) seen-list))))) + (elmo-dop-unlock-message (car appendings)) + (setq appendings (cdr appendings)))) ;; All pending append operation is flushed. (elmo-dop-append-list-save folder nil) (elmo-commit folder) diff --git a/wl/ChangeLog b/wl/ChangeLog index 81ffd86..1b1a6ca 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,12 @@ +2000-10-10 Kenichi OKADA + + * wl-summary.el (wl-summary-sync-force-update): Append queue + `mark-as-read'if unplugged. + +2000-10-09 Kenichi OKADA + + * wl-summary.el (wl-summary-refile-subr): Fix. + 2000-10-10 TAKAHASHI Kaoru * wl-version.el: New file. Use product.el. @@ -37,11 +46,11 @@ * wl-score.el (toplevel): Remove (provide 'elmo-msgdb). And add (require 'elmo-msgdb) for inline function. -2000-10-06 Kenichi OKADA +2000-10-06 Kenichi OKADA * wl-vars.el (wl-draft-queue-save-variables): Add variables. -2000-10-06 Kenichi OKADA +2000-10-06 Kenichi OKADA * wl-score.el (wl-score-headers): Fix for the confusing macro `elmo-kill-buffer'. @@ -743,7 +752,7 @@ * wl-draft.el (wl-draft-reply): Fixed problem when to or cc contains invalid address syntax. -2000-07-26 Kenichi OKADA +2000-07-26 Kenichi OKADA * wl-folder.el (wl-folder-check-entity-async): Use `elmo-nntp-spec-hostname'. @@ -763,7 +772,7 @@ * wl-refile.el (wl-refile-learn): Move hit element to the top of `wl-refile-alist'. -2000-07-26 Kenichi OKADA +2000-07-26 Kenichi OKADA * wl-draft.el (wl-draft): Added argument `content-transfer-encoding'. (wl-draft-edit-string): Ditto. @@ -781,7 +790,7 @@ * wl-draft.el (wl-draft-reply): Fixed problem when mail-followup-to contains an address which is not included in original to or cc. -2000-07-19 Kenichi OKADA +2000-07-19 Kenichi OKADA * wl-summary.el (wl-summary-target-mark-uudecode): Error when begin-line does not exist. @@ -829,7 +838,7 @@ (Append numbers confirmed as disappeared to the killed list.) (wl-summary-confirm-appends): Don't display negative number. -2000-07-07 Kenichi OKADA +2000-07-07 Kenichi OKADA * wl-summary.el (TopLevel): Define-maybe `ps-print-preprint'. @@ -854,7 +863,7 @@ * wl-demo.el (wl-demo): Don't use `eval'. -2000-07-07 Kenichi OKADA +2000-07-07 Kenichi OKADA * wl-summary.el (wl-summary-buffer-thread-modified): New buffer-local variable. @@ -882,7 +891,7 @@ don't hide scroll bars under FSF Emacsen because it may incur an undesirable redrawing. -2000-07-04 Kenichi OKADA +2000-07-04 Kenichi OKADA * wl-draft.el (wl-draft-edit-string): Call `wl-draft-reedit-hook' instead of `wl-mail-setup-hook'. diff --git a/wl/wl-summary.el b/wl/wl-summary.el index b29e388..d3916e1 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -1132,6 +1132,7 @@ q Goto folder mode. (defun wl-summary-sync-force-update (&optional unset-cursor) (interactive) (let ((msgdb-dir (elmo-msgdb-expand-path wl-summary-buffer-folder-name)) + (type (elmo-folder-get-type wl-summary-buffer-folder-name)) ret-val seen-list) (unwind-protect (progn @@ -1139,7 +1140,18 @@ q Goto folder mode. (setq seen-list (elmo-msgdb-seen-load msgdb-dir))) (setq ret-val (wl-summary-sync-update3 seen-list unset-cursor)) (if wl-summary-buffer-persistent - (elmo-msgdb-seen-save msgdb-dir nil))) + (progn + (if (and (eq type 'imap4) + (not (elmo-folder-plugged-p + wl-summary-buffer-folder-name))) + (let* ((msgdb wl-summary-buffer-msgdb) + (number-alist (elmo-msgdb-get-number-alist msgdb))) + (elmo-mark-as-read wl-summary-buffer-folder-name + (mapcar + (lambda (msgid) + (car (rassoc msgid number-alist))) + seen-list) msgdb))) + (elmo-msgdb-seen-save msgdb-dir nil)))) (set-buffer (current-buffer))) (if (interactive-p) (message "%s" ret-val)) @@ -3509,7 +3521,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (if (string= folder wl-summary-buffer-folder-name) (error "Same folder")) (if (and - (not (elmo-folder-plugged-p folder)) + (not (elmo-folder-plugged-p wl-summary-buffer-folder-name)) (or (null msgid) (not (elmo-cache-exists-p msgid)))) (error "Unplugged (no cache or msgid)"))