aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-09-28 21:36:20 +0200
committerLars Ingebrigtsen2019-09-28 21:36:20 +0200
commitbc94e2dd4be04cbe7b5ab6749e30ef6c305c0588 (patch)
treeb16fdebc847be94ad85ef21b3b52c03f51d0d7d3
parentbb50aaa325aee980cdaeaa2358f4f54db5eb71fe (diff)
downloademacs-bc94e2dd4be04cbe7b5ab6749e30ef6c305c0588.tar.gz
emacs-bc94e2dd4be04cbe7b5ab6749e30ef6c305c0588.zip
Expunge INBOX messages after splitting
* lisp/gnus/nnimap.el (nnimap-split-incoming-mail): Expunge articles after splitting (bug#37541).
-rw-r--r--lisp/gnus/nnimap.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index baf2f9f4771..d4681e2b436 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."
1125 1125
1126(defun nnimap-delete-article (articles) 1126(defun nnimap-delete-article (articles)
1127 "Delete ARTICLES." 1127 "Delete ARTICLES."
1128 (debug articles)
1129 (with-current-buffer (nnimap-buffer) 1128 (with-current-buffer (nnimap-buffer)
1130 (nnimap-command "UID STORE %s +FLAGS.SILENT (\\Deleted)" 1129 (nnimap-command "UID STORE %s +FLAGS.SILENT (\\Deleted)"
1131 (nnimap-article-ranges articles)) 1130 (nnimap-article-ranges articles))
@@ -2175,9 +2174,14 @@ Return the server's response to the SELECT or EXAMINE command."
2175 (when (and (not can-move) sequences) 2174 (when (and (not can-move) sequences)
2176 (nnimap-wait-for-response (caar sequences)) 2175 (nnimap-wait-for-response (caar sequences))
2177 ;; And then mark the successful copy actions as deleted, 2176 ;; And then mark the successful copy actions as deleted,
2178 ;; and possibly expunge them. 2177 ;; and possibly expunge them. Almost any non-nil
2179 (nnimap-delete-article 2178 ;; setting of nnimap-expunge should lead to expunging
2180 (nnimap-parse-copied-articles sequences))) 2179 ;; here.
2180 (let ((nnimap-expunge (and nnimap-expunge
2181 (not (equal nnimap-expunge 'never))
2182 'immediate)))
2183 (nnimap-delete-article
2184 (nnimap-parse-copied-articles sequences))))
2181 (when junk-articles 2185 (when junk-articles
2182 (nnimap-delete-article junk-articles)))))))) 2186 (nnimap-delete-article junk-articles))))))))
2183 2187