From d79a2c36e8115ffd57eb722b48733fbb9944bc27 Mon Sep 17 00:00:00 2001 From: teranisi Date: Wed, 4 Dec 2002 12:13:24 +0000 Subject: [PATCH] * wl-folder.el (wl-folder-sync-entity): Fixed problem when the folder is sticky. (wl-folder-mark-as-read-all-entity): Ditto. (wl-folder-prefetch-entity): Ditto. * elmo-pop3.el (elmo-pop3-process-filter): Check whether the pop3 process buffer lives or not. * elmo-dop.el (elmo-dop-queue-flush): Don't append to the dop-queue while flushing queues (It causes infinite loop). --- elmo/ChangeLog | 8 ++++++++ elmo/elmo-dop.el | 4 +++- elmo/elmo-pop3.el | 27 ++++++++++++------------ wl/ChangeLog | 7 +++++++ wl/wl-folder.el | 59 +++++++++++++++++++++++++++++++++++++++-------------- 5 files changed, 76 insertions(+), 29 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index f95fcc8..abea238 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,11 @@ +2002-12-04 Yuuichi Teranishi + + * elmo-pop3.el (elmo-pop3-process-filter): Check whether the pop3 + process buffer lives or not. + + * elmo-dop.el (elmo-dop-queue-flush): Don't append to the dop-queue + while flushing queues (It causes infinite loop). + 2002-11-26 Yuuichi Teranishi * elmo-imap4.el (elmo-folder-list-subfolders): Fixed last change. diff --git a/elmo/elmo-dop.el b/elmo/elmo-dop.el index e64c203..2ea9ebd 100644 --- a/elmo/elmo-dop.el +++ b/elmo/elmo-dop.el @@ -129,7 +129,9 @@ Saved queue is old version(2.6). Clear all pending operations? ") (setq folder (elmo-make-folder (elmo-dop-queue-fname (car queue)))) - (elmo-folder-open folder)) + (elmo-folder-open folder) + (unless (elmo-folder-plugged-p folder) + (error "Unplugged."))) (elmo-dop-queue-arguments (car queue))) (elmo-folder-close folder)) (quit (setq failure t)) diff --git a/elmo/elmo-pop3.el b/elmo/elmo-pop3.el index ae25a19..d594e93 100644 --- a/elmo/elmo-pop3.el +++ b/elmo/elmo-pop3.el @@ -233,19 +233,20 @@ If IF-EXISTS is `any-exists', get BIFF session or normal session if exists." return-value))) (defun elmo-pop3-process-filter (process output) - (with-current-buffer (process-buffer process) - (goto-char (point-max)) - (insert output) - (elmo-pop3-debug "RECEIVED: %s\n" output) - (if (and elmo-pop3-total-size - (> elmo-pop3-total-size - (min elmo-display-retrieval-progress-threshold 100))) - (elmo-display-progress - 'elmo-display-retrieval-progress - (format "Retrieving (%d/%d bytes)..." - (buffer-size) - elmo-pop3-total-size) - (/ (buffer-size) (/ elmo-pop3-total-size 100)))))) + (when (buffer-live-p (process-buffer process)) + (with-current-buffer (process-buffer process) + (goto-char (point-max)) + (insert output) + (elmo-pop3-debug "RECEIVED: %s\n" output) + (if (and elmo-pop3-total-size + (> elmo-pop3-total-size + (min elmo-display-retrieval-progress-threshold 100))) + (elmo-display-progress + 'elmo-display-retrieval-progress + (format "Retrieving (%d/%d bytes)..." + (buffer-size) + elmo-pop3-total-size) + (/ (buffer-size) (/ elmo-pop3-total-size 100))))))) (defun elmo-pop3-auth-user (session) (let ((process (elmo-network-session-process-internal session))) diff --git a/wl/ChangeLog b/wl/ChangeLog index 247baf5..2448e9b 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,10 @@ +2002-12-04 Yuuichi Teranishi + + * wl-folder.el (wl-folder-sync-entity): Fixed problem when the + folder is sticky. + (wl-folder-mark-as-read-all-entity): Ditto. + (wl-folder-prefetch-entity): Ditto. + 2002-12-04 Yasutaka SHINDOH * wl-demo.el (wl-demo-icon-name): Cope with Medow. diff --git a/wl/wl-folder.el b/wl/wl-folder.el index ea6ec23..ea911f4 100644 --- a/wl/wl-folder.el +++ b/wl/wl-folder.el @@ -998,14 +998,21 @@ If current line is group folder, check all sub entries." (wl-summary-always-sticky-folder-p folder)) wl-summary-highlight)) - wl-auto-select-first new unread) + wl-auto-select-first new unread sticky) (setq new (or (car nums) 0)) (setq unread (or (cadr nums) 0)) (if (or (not unread-only) (or (< 0 new) (< 0 unread))) - (let ((wl-summary-buffer-name (concat - wl-summary-buffer-name - (symbol-name this-command))) + (let ((wl-summary-buffer-name + (if (setq sticky (get-buffer (wl-summary-sticky-buffer-name + (elmo-folder-name-internal + folder)))) + ;; Sticky folder exists. + (wl-summary-sticky-buffer-name + (elmo-folder-name-internal folder)) + (concat + wl-summary-buffer-name + (symbol-name this-command)))) (wl-summary-use-frame nil) (wl-summary-always-sticky-folder-list nil)) (save-window-excursion @@ -1014,7 +1021,9 @@ If current line is group folder, check all sub entries." (wl-summary-get-sync-range folder) nil nil nil t) - (wl-summary-exit))))))))) + (if sticky + (wl-summary-save-status) + (wl-summary-exit)))))))))) (defun wl-folder-sync-current-entity (&optional unread-only) "Synchronize the folder at position. @@ -1048,22 +1057,32 @@ If current line is group folder, check all subfolders." (wl-summary-always-sticky-folder-p folder)) wl-summary-highlight)) - wl-auto-select-first new unread) + wl-auto-select-first new unread sticky) (setq new (or (car nums) 0)) (setq unread (or (cadr nums) 0)) (if (or (< 0 new) (< 0 unread)) (save-window-excursion (save-excursion - (let ((wl-summary-buffer-name (concat - wl-summary-buffer-name - (symbol-name this-command))) + (let ((wl-summary-buffer-name + (if (setq sticky (get-buffer + (wl-summary-sticky-buffer-name + (elmo-folder-name-internal + folder)))) + ;; Sticky folder exists. + (wl-summary-sticky-buffer-name + (elmo-folder-name-internal folder)) + (concat + wl-summary-buffer-name + (symbol-name this-command)))) (wl-summary-use-frame nil) (wl-summary-always-sticky-folder-list nil)) (wl-summary-goto-folder-subr entity (wl-summary-get-sync-range folder) nil) (wl-summary-mark-as-read-all) - (wl-summary-exit)))) + (if sticky + (wl-summary-save-status) + (wl-summary-exit))))) (sit-for 0)))))) (defun wl-folder-mark-as-read-all-current-entity () @@ -2678,16 +2697,24 @@ Use `wl-subscribed-mailing-list'." wl-summary-highlight)) wl-summary-exit-next-move wl-auto-select-first ret-val - count) + count sticky) (setq count (or (car nums) 0)) (setq count (+ count (wl-folder-count-incorporates folder))) (if (or (null (car nums)) ; unknown (< 0 count)) (save-window-excursion (save-excursion - (let ((wl-summary-buffer-name (concat - wl-summary-buffer-name - (symbol-name this-command))) + (let ((wl-summary-buffer-name + (if (setq sticky (get-buffer + (wl-summary-sticky-buffer-name + (elmo-folder-name-internal + folder)))) + ;; Sticky folder exists. + (wl-summary-sticky-buffer-name + (elmo-folder-name-internal folder)) + (concat + wl-summary-buffer-name + (symbol-name this-command)))) (wl-summary-use-frame nil) (wl-summary-always-sticky-folder-list nil)) (wl-summary-goto-folder-subr entity @@ -2695,7 +2722,9 @@ Use `wl-subscribed-mailing-list'." folder) nil) (setq ret-val (wl-summary-incorporate)) - (wl-summary-exit) + (if sticky + (wl-summary-save-status) + (wl-summary-exit)) ret-val))) (cons 0 0)))))) -- 1.7.10.4