emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master bc94e2d 2/2: Expunge INBOX messages after splitting


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master bc94e2d 2/2: Expunge INBOX messages after splitting
Date: Sat, 28 Sep 2019 15:36:27 -0400 (EDT)

branch: master
commit bc94e2dd4be04cbe7b5ab6749e30ef6c305c0588
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Expunge INBOX messages after splitting
    
    * lisp/gnus/nnimap.el (nnimap-split-incoming-mail): Expunge
    articles after splitting (bug#37541).
---
 lisp/gnus/nnimap.el | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index baf2f9f..d4681e2 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -1125,7 +1125,6 @@ If LIMIT, first try to limit the search to the N last 
articles."
 
 (defun nnimap-delete-article (articles)
   "Delete ARTICLES."
-  (debug articles)
   (with-current-buffer (nnimap-buffer)
     (nnimap-command "UID STORE %s +FLAGS.SILENT (\\Deleted)"
                    (nnimap-article-ranges articles))
@@ -2175,9 +2174,14 @@ Return the server's response to the SELECT or EXAMINE 
command."
            (when (and (not can-move) sequences)
              (nnimap-wait-for-response (caar sequences))
              ;; And then mark the successful copy actions as deleted,
-             ;; and possibly expunge them.
-              (nnimap-delete-article
-               (nnimap-parse-copied-articles sequences)))
+             ;; and possibly expunge them.  Almost any non-nil
+             ;; setting of nnimap-expunge should lead to expunging
+             ;; here.
+             (let ((nnimap-expunge (and nnimap-expunge
+                                        (not (equal nnimap-expunge 'never))
+                                        'immediate)))
+               (nnimap-delete-article
+                (nnimap-parse-copied-articles sequences))))
            (when junk-articles
               (nnimap-delete-article junk-articles))))))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]