(nnimap-split-articles): Don't download body unless
authorSimon Josefsson <jas@extundo.com>
Sun, 20 Apr 2003 14:04:11 +0000 (14:04 +0000)
committerSimon Josefsson <jas@extundo.com>
Sun, 20 Apr 2003 14:04:11 +0000 (14:04 +0000)
required.

lisp/ChangeLog
lisp/nnimap.el

index 489bcd5..ba3f118 100644 (file)
@@ -1,5 +1,8 @@
 2003-04-20  Simon Josefsson  <jas@extundo.com>
 
+       * nnimap.el (nnimap-split-articles): Don't download body unless
+       required.
+
        * imap.el (imap-gssapi-open, imap-ssl-open): Erase buffer before
        starting process, like imap-kerberos4-open does.
 
index 6daace9..31a7837 100644 (file)
@@ -1267,7 +1267,9 @@ function is generally only called when Gnus is shutting down."
          (when (setq rule (nnimap-split-find-rule server inbox))
            ;; iterate over articles
            (dolist (article (imap-search nnimap-split-predicate))
-             (when (if nnimap-split-download-body
+             (when (if (if (eq nnimap-split-download-body 'default)
+                           nnimap-split-download-body-default
+                         nnimap-split-download-body)
                        (and (nnimap-request-article article)
                             (mail-narrow-to-head))
                      (nnimap-request-head article))
@@ -1285,16 +1287,18 @@ function is generally only called when Gnus is shutting down."
                         (setq removeorig t)
                         (when nnmail-cache-accepted-message-ids
                           (with-current-buffer nntp-server-buffer
-                             (let (msgid)
-                               (and (setq msgid
+                            (let (msgid)
+                              (and (setq msgid
                                          (nnmail-fetch-field "message-id"))
-                                    (nnmail-cache-insert msgid to-group)))))
+                                   (nnmail-cache-insert msgid to-group)))))
                         ;; Add the group-art list to the history list.
                         (push (list (cons to-group 0)) nnmail-split-history))
                        (t
                         (message "IMAP split failed to move %s:%s:%d to %s"
                                  server inbox article to-group))))
-               (if nnimap-split-download-body
+               (if (if (eq nnimap-split-download-body 'default)
+                       nnimap-split-download-body-default
+                     nnimap-split-download-body)
                    (widen))
                ;; remove article if it was successfully copied somewhere
                (and removeorig