[gnus git] branch no-gnus updated: m0-1-20-g1e24402 =1= Fix up the nnimap "initial sync" message for non-QRESYNC servers

Lars Ingebrigtsen <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  1e244029d8b4270d5fc0e32d943f39a51ca1ea88 (commit)
      from  46f5b0a42aa14e7fc20a8080dcd25da2d5d891ef (commit)


- Log -----------------------------------------------------------------
commit 1e244029d8b4270d5fc0e32d943f39a51ca1ea88
Author: Lars Ingebrigtsen <[email protected]>
Date:   Thu Feb 2 13:24:25 2012 +0100

    Fix up the nnimap "initial sync" message for non-QRESYNC servers
    
    * nnimap.el (nnimap-retrieve-group-data-early): Don't say we're doing
    an initial sync unless we're really doing one.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 405d72e..3455764 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
 2012-02-02  Lars Ingebrigtsen  <[email protected]>
 
+	* 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).
 
diff --git a/lisp/nnimap.el b/lisp/nnimap.el
index c3b3670..a5e8238 100644
--- a/lisp/nnimap.el
+++ b/lisp/nnimap.el
@@ -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")))
+		     "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)

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog |    3 +++
 lisp/nnimap.el |   18 +++++++++---------
 2 files changed, 12 insertions(+), 9 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, no-gnus has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.