From: Simon Josefsson Date: Sat, 1 Sep 2001 20:05:48 +0000 (+0000) Subject: 2001-09-01 Simon Josefsson X-Git-Url: http://cgit.sxemacs.org/?a=commitdiff_plain;h=1fa15815f71373788afe349aca310b7de24143d2;p=gnus 2001-09-01 Simon Josefsson * 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2284b4c99..85a0ed161 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2001-09-01 Simon Josefsson + + * 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 * imap.el (imap-mailbox-examine, imap-mailbox-examine-1): Fix a diff --git a/lisp/nnml.el b/lisp/nnml.el index 0201c9f35..97e32ac71 100644 --- a/lisp/nnml.el +++ b/lisp/nnml.el @@ -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