2001-09-01 Simon Josefsson <jas@extundo.com>
authorSimon Josefsson <jas@extundo.com>
Sat, 1 Sep 2001 20:05:48 +0000 (20:05 +0000)
committerSimon Josefsson <jas@extundo.com>
Sat, 1 Sep 2001 20:05:48 +0000 (20:05 +0000)
* nnml.el (nnml-request-expire-articles): Also bind
`nnml-current-group' and `nnml-article-file-alist' when using
expiry-target. (Otherwise nnml will be in a inconsistent internal
state causing all kind of problems.)
(nnml-request-expire-articles): If `nnml-article-to-file' or
`file-attributes' failes, return article as un-expirable instead
of treating it as expired.

lisp/ChangeLog
lisp/nnml.el

index 2284b4c..85a0ed1 100644 (file)
@@ -1,3 +1,13 @@
+2001-09-01  Simon Josefsson  <jas@extundo.com>
+
+       * nnml.el (nnml-request-expire-articles): Also bind
+       `nnml-current-group' and `nnml-article-file-alist' when using
+       expiry-target. (Otherwise nnml will be in a inconsistent internal
+       state causing all kind of problems.)
+       (nnml-request-expire-articles): If `nnml-article-to-file' or
+       `file-attributes' failes, return article as un-expirable instead
+       of treating it as expired.
+
 2001-08-31  Sam Steingold  <sds@gnu.org>
 
        * imap.el (imap-mailbox-examine, imap-mailbox-examine-1): Fix a
index 0201c9f..97e32ac 100644 (file)
@@ -309,30 +309,29 @@ This variable is a virtual server slot.  See the Gnus manual for details.")
     (setq articles (gnus-sorted-intersection articles active-articles))
 
     (while (and articles is-old)
-      (when (setq article (nnml-article-to-file (setq number (pop articles))))
-       (when (setq mod-time (nth 5 (file-attributes article)))
-         (if (and (nnml-deletable-article-p group number)
-                  (setq is-old
-                        (nnmail-expired-article-p group mod-time force
-                                                  nnml-inhibit-expiry)))
-             (progn
-               ;; Allow a special target group.
-               (unless (eq nnmail-expiry-target 'delete)
-                 (with-temp-buffer
-                   (nnml-request-article number group server
-                                         (current-buffer))
-                   (let ((nnml-current-directory nil))
-                     (nnmail-expiry-target-group
-                      nnmail-expiry-target group))))
-               (nnheader-message 5 "Deleting article %s in %s"
-                                 number group)
-               (condition-case ()
-                   (funcall nnmail-delete-file-function article)
-                 (file-error
-                  (push number rest)))
-               (setq active-articles (delq number active-articles))
-               (nnml-nov-delete-article group number))
-           (push number rest)))))
+      (if (and (setq article (nnml-article-to-file (setq number (pop articles))))
+              (setq mod-time (nth 5 (file-attributes article)))
+              (nnml-deletable-article-p group number)
+              (setq is-old (nnmail-expired-article-p group mod-time force
+                                                     nnml-inhibit-expiry)))
+         (progn
+           ;; Allow a special target group.
+           (unless (eq nnmail-expiry-target 'delete)
+             (with-temp-buffer
+               (nnml-request-article number group server (current-buffer))
+               (let (nnml-current-directory
+                     nnml-current-group
+                     nnml-article-file-alist)
+                 (nnmail-expiry-target-group nnmail-expiry-target group))))
+           (nnheader-message 5 "Deleting article %s in %s"
+                             number group)
+           (condition-case ()
+               (funcall nnmail-delete-file-function article)
+             (file-error
+              (push number rest)))
+           (setq active-articles (delq number active-articles))
+           (nnml-nov-delete-article group number))
+       (push number rest)))
     (let ((active (nth 1 (assoc group nnml-group-alist))))
       (when active
        (setcar active (or (and active-articles