emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r107048: nnimap.el: Make nnimap messa


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r107048: nnimap.el: Make nnimap message better when initially fetching data
Date: Wed, 01 Feb 2012 22:06:29 +0000
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107048
author: Lars Ingebrigtsen <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Wed 2012-02-01 22:06:29 +0000
message:
  nnimap.el: Make nnimap message better when initially fetching data
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/nnimap.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2012-02-01 09:00:42 +0000
+++ b/lisp/gnus/ChangeLog       2012-02-01 22:06:29 +0000
@@ -1,3 +1,10 @@
+2012-02-01  Lars Ingebrigtsen  <address@hidden>
+
+       * nnimap.el (nnimap-retrieve-group-data-early): Keep track of how many
+       groups we do a total scan for.
+       (nnimap-wait-for-response): Say that we're doing a total scan, if we're
+       doing that.
+
 2012-01-31  Jim Meyering  <address@hidden>
 
        * gnus-agent.el (gnus-agent-expire-unagentized-dirs):

=== modified file 'lisp/gnus/nnimap.el'
--- a/lisp/gnus/nnimap.el       2012-01-30 22:03:11 +0000
+++ b/lisp/gnus/nnimap.el       2012-02-01 22:06:29 +0000
@@ -134,7 +134,7 @@
 
 (defstruct nnimap
   group process commands capabilities select-result newlinep server
-  last-command-time greeting examined stream-type)
+  last-command-time greeting examined stream-type initial-resync)
 
 (defvar nnimap-object nil)
 
@@ -288,7 +288,8 @@
     (gnus-add-buffer)
     (set (make-local-variable 'after-change-functions) nil)
     (set (make-local-variable 'nnimap-object)
-        (make-nnimap :server (nnoo-current-server 'nnimap)))
+        (make-nnimap :server (nnoo-current-server 'nnimap)
+                     :initial-resync 0))
     (push (list buffer (current-buffer)) nnimap-connection-alist)
     (push (current-buffer) nnimap-process-buffers)
     (current-buffer)))
@@ -1218,6 +1219,7 @@
     (with-current-buffer (nnimap-buffer)
       (erase-buffer)
       (setf (nnimap-group nnimap-object) nil)
+      (setf (nnimap-initial-resync nnimap-object) 0)
       (let ((qresyncp (nnimap-capability "QRESYNC"))
            params groups sequences active uidvalidity modseq group)
        ;; Go through the infos and gather the data needed to know
@@ -1256,6 +1258,8 @@
                     ;; examine), but will tell us whether the group
                     ;; is read-only or not.
                     "SELECT")))
+             (setf (nnimap-initial-resync nnimap-object)
+                   (1+ (nnimap-initial-resync nnimap-object)))
              (push (list (nnimap-send-command "%s %S" command
                                               (utf7-encode group t))
                          (nnimap-send-command "UID FETCH %d:* FLAGS" start)
@@ -1738,10 +1742,15 @@
                        (not (looking-at (format "%d .*\n" sequence)))))
            (when messagep
              (nnheader-message-maybe
-              7 "nnimap read %dk from %s" (/ (buffer-size) 1000)
-              nnimap-address))
+              7 "nnimap read %dk from %s%s" (/ (buffer-size) 1000)
+              nnimap-address
+              (if (not (zerop (nnimap-initial-resync nnimap-object)))
+                  (format " (initial sync of %d groups; please wait)"
+                          (nnimap-initial-resync nnimap-object))
+                "")))
            (nnheader-accept-process-output process)
            (goto-char (point-max)))
+         (setf (nnimap-initial-resync nnimap-object) 0)
           openp)
       (quit
        (when debug-on-quit


reply via email to

[Prev in Thread] Current Thread [Next in Thread]