Only run -request-scan once per method on `g'.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Wed, 22 Sep 2010 19:44:52 +0000 (21:44 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Wed, 22 Sep 2010 19:44:52 +0000 (21:44 +0200)
This ensures that backends like nnfolder don't open all their folders.

lisp/ChangeLog
lisp/gnus-start.el
lisp/nnimap.el

index 3aac516..fe339b9 100644 (file)
@@ -1,5 +1,9 @@
 2010-09-22  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-start.el (gnus-read-active-for-groups): Only run -request-scan
+       once per method on `g'.  This ensures that backends like nnfolder don't
+       open all their folders.
+
        * nnimap.el (nnimap-split-incoming-mail): Delete 'junk.
        (nnimap-request-list): Nix out group in the correct buffer.
        (nnimap-parse-flags): Implement by using `read' instead of
@@ -7,6 +11,8 @@
        (nnimap-flags-to-marks): Pass on permanent-flags.
        (nnimap-make-process-buffer): Record the server name.
        (nnimap-parse-flags): Fix typo.
+       (nnimap-request-scan): Run split on the server in general, not just a
+       single group.
 
        * nnmail.el (nnmail-split-incoming): Take an optional junk-func
        parameter, and propagate this downwards.
index c2f09a8..851e96b 100644 (file)
@@ -1757,8 +1757,7 @@ If SCAN, request a scan of that group as well."
          (when (gnus-check-backend-function
                 'retrieve-group-data-early (car method))
            (when (gnus-check-backend-function 'request-scan (car method))
-             (dolist (info infos)
-               (gnus-request-scan (gnus-info-group info) method)))
+             (gnus-request-scan nil method))
            (setcar (nthcdr 3 elem)
                    (gnus-retrieve-group-data-early method infos))))))
 
@@ -1806,8 +1805,7 @@ If SCAN, request a scan of that group as well."
       (gnus-agent-save-active method))
      ((gnus-check-backend-function 'retrieve-groups (car method))
       (when (gnus-check-backend-function 'request-scan (car method))
-       (dolist (info infos)
-         (gnus-request-scan (gnus-info-group info) method)))
+       (gnus-request-scan nil method))
       (let (groups)
        (gnus-read-active-file-2
         (dolist (info infos (nreverse groups))
@@ -2055,10 +2053,7 @@ If SCAN, request a scan of that group as well."
                          (gnus-online method))
                     (not gnus-agent))
                 (gnus-check-backend-function 'request-scan (car method)))
-       (if infos
-           (dolist (info infos)
-             (gnus-request-scan (gnus-info-group info) method))
-         (gnus-request-scan nil method)))
+       (gnus-request-scan nil method))
       (cond
        ((and (eq gnus-read-active-file 'some)
             (gnus-check-backend-function 'retrieve-groups (car method))
index e432046..a8902b2 100644 (file)
@@ -587,7 +587,6 @@ not done by default on servers that doesn't support that command.")
 
 (deffoo nnimap-request-scan (&optional group server)
   (when (and (nnimap-possibly-change-group nil server)
-            (equal group nnimap-inbox)
             nnimap-inbox
             nnimap-split-methods)
     (message "nnimap %s splitting mail..." server)