diff options
author | Eli Zaretskii <eliz@gnu.org> | 2023-02-09 17:34:19 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2023-02-09 17:34:19 +0200 |
commit | 68a6b364d1cdc8894c25df555786b870973e07cb (patch) | |
tree | 3a533fe8603d5570574555fbe4740edb5cc053df /lisp | |
parent | 67c6ec25590a690cbf8659e65e64f319ce3bcd64 (diff) | |
download | emacs-68a6b364d1cdc8894c25df555786b870973e07cb.tar.gz emacs-68a6b364d1cdc8894c25df555786b870973e07cb.tar.bz2 emacs-68a6b364d1cdc8894c25df555786b870973e07cb.zip |
Fix 'rmail-summary-output'
* lisp/mail/rmailsum.el (rmail-summary-output): Fix deletion of
messages when 'rmail-output-reset-deleted-flag' is non-nil.
(Bug#61380)
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mail/rmailsum.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index ba580907658..21dec2bbeb7 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -1931,7 +1931,7 @@ even if the header display is currently pruned." (progn (require 'rmailout) (list (rmail-output-read-file-name) (prefix-numeric-value current-prefix-arg)))) - (let ((i 0) prev-msg) + (let ((i 0) prev-msg curmsg) (while (and (< i n) (progn (rmail-summary-goto-msg) @@ -1942,7 +1942,11 @@ even if the header display is currently pruned." (setq i (1+ i)) (with-current-buffer rmail-buffer (let ((rmail-delete-after-output nil)) + (setq curmsg rmail-current-message) (rmail-output file-name 1))) + ;; rmail-output sometimes moves to the next message; undo that. + (or (= curmsg (rmail-summary-msg-number)) + (rmail-summary-goto-msg curmsg)) (if rmail-delete-after-output (rmail-summary-delete-forward nil) (if (< i n) |