Search further when we're not using streaming.
[gnus] / lisp / nnimap.el
index 44d9bab..cb378ec 100644 (file)
@@ -62,6 +62,10 @@ Values are `ssl', `network', `starttls' or `shell'.")
 (defvoo nnimap-inbox nil
   "The mail box where incoming mail arrives and should be split out of.")
 
+(defvoo nnimap-split-methods nil
+  "How mail is split.
+Uses the same syntax as nnmail-split-methods")
+
 (defvoo nnimap-authenticator nil
   "How nnimap authenticate itself to the server.
 Possible choices are nil (use default methods) or `anonymous'.")
@@ -107,8 +111,6 @@ some servers.")
     (download "gnus-download")
     (forward "gnus-forward")))
 
-(defvar nnimap-split-methods nil)
-
 (defun nnimap-buffer ()
   (nnimap-find-process-buffer nntp-server-buffer))
 
@@ -1129,9 +1131,12 @@ some servers.")
     (goto-char (point-max))
     (while (and (setq openp (memq (process-status process)
                                  '(open run)))
-               (not (re-search-backward (format "^%d .*\n" sequence)
-                                        (max (point-min) (- (point) 500))
-                                        t)))
+               (not (re-search-backward
+                     (format "^%d .*\n" sequence)
+                     (if nnimap-streaming
+                         (point-min)
+                       (max (point-min) (- (point) 500)))
+                     t)))
       (when messagep
        (message "Read %dKB" (/ (buffer-size) 1000)))
       (nnheader-accept-process-output process)