]> code.delx.au - gnu-emacs/commitdiff
nnimap.el (nnimap-retrieve-group-data-early): Don't say we're doing an initial sync...
authorLars Ingebrigtsen <larsi@gnus.org>
Thu, 2 Feb 2012 22:10:47 +0000 (22:10 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Thu, 2 Feb 2012 22:10:47 +0000 (22:10 +0000)
lisp/gnus/ChangeLog
lisp/gnus/nnimap.el

index 793540fd012d82ec74b374eac6e3366403d178b6..10505cd8e486d53a5085c8e288b98c765f30b68f 100644 (file)
@@ -1,5 +1,8 @@
 2012-02-02  Lars Ingebrigtsen  <larsi@gnus.org>
 
+       * nnimap.el (nnimap-retrieve-group-data-early): Don't say we're doing
+       an initial sync unless we're really doing one.
+
        * gnus-group.el (gnus-group-read-ephemeral-group): Don't add a new
        address parameter if one already exists (bug#9676).
 
index c3b36709904e3277ed28ce0c5768f6a98fe5520e..a5e82389ab50da1d510a466f15368c785cd27782 100644 (file)
@@ -1244,12 +1244,7 @@ textual parts.")
                     'qresync
                     nil group 'qresync)
               sequences)
-           (let ((start
-                  (if (and active uidvalidity)
-                      ;; Fetch the last 100 flags.
-                      (max 1 (- (cdr active) 100))
-                    1))
-                 (command
+           (let ((command
                   (if uidvalidity
                       "EXAMINE"
                     ;; If we don't have a UIDVALIDITY, then this is
@@ -1257,9 +1252,14 @@ textual parts.")
                     ;; have to do a SELECT (which is slower than an
                     ;; 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)))
+                    "SELECT"))
+                 start)
+             (if (and active uidvalidity)
+                 ;; Fetch the last 100 flags.
+                 (setq start (max 1 (- (cdr active) 100)))
+               (setf (nnimap-initial-resync nnimap-object)
+                     (1+ (nnimap-initial-resync nnimap-object)))
+               (setq start 1))
              (push (list (nnimap-send-command "%s %S" command
                                               (utf7-encode group t))
                          (nnimap-send-command "UID FETCH %d:* FLAGS" start)