* wl-folder.el (wl-folder-sync-entity): Fixed problem when the folder is
authorteranisi <teranisi>
Wed, 4 Dec 2002 12:13:24 +0000 (12:13 +0000)
committerteranisi <teranisi>
Wed, 4 Dec 2002 12:13:24 +0000 (12:13 +0000)
 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
elmo/elmo-dop.el
elmo/elmo-pop3.el
wl/ChangeLog
wl/wl-folder.el

index f95fcc8..abea238 100644 (file)
@@ -1,3 +1,11 @@
+2002-12-04  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * 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  <teranisi@gohome.org>
 
        * elmo-imap4.el (elmo-folder-list-subfolders): Fixed last change.
index e64c203..2ea9ebd 100644 (file)
@@ -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))
index ae25a19..d594e93 100644 (file)
@@ -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)))
index 247baf5..2448e9b 100644 (file)
@@ -1,3 +1,10 @@
+2002-12-04  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * 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  <ring@fan.gr.jp>
 
        * wl-demo.el (wl-demo-icon-name): Cope with Medow.
index ea6ec23..ea911f4 100644 (file)
@@ -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))))))