emacs-diffs
[Top][All Lists]
Advanced

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

emacs-27 5118394: Ensure that gnus-summary-attach-article finds the righ


From: Eric Abrahamsen
Subject: emacs-27 5118394: Ensure that gnus-summary-attach-article finds the right articles
Date: Sat, 18 Jan 2020 16:55:34 -0500 (EST)

branch: emacs-27
commit 5118394e5be1f4ae2d74d7aee08aa2c149af790a
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    Ensure that gnus-summary-attach-article finds the right articles
    
    * lisp/gnus/gnus-msg.el (gnus-summary-attach-article): Before
    iterating over the articles to attach, first close any open
    article. Using `set-buffer' required `gnus-summary-select-article' to
    re-set the buffer every time, meaning we never got off the original
    article.
    
    (cherry picked from commit 447bb1313a6abc07776d93ee78cd976ab43856e5)
---
 lisp/gnus/gnus-msg.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index 466a627..daaea39 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -1985,13 +1985,14 @@ process-mark several articles, they will all be 
attached."
                                       buffers t nil nil (car buffers))))
       (gnus-summary-mail-other-window)
       (setq destination (current-buffer)))
+    (gnus-summary-expand-window)
     (gnus-summary-iterate n
       (gnus-summary-select-article)
-      (set-buffer destination)
-      ;; Attach at the end of the buffer.
-      (save-excursion
-       (goto-char (point-max))
-       (message-forward-make-body-mime gnus-original-article-buffer)))
+      (with-current-buffer destination
+       ;; Attach at the end of the buffer.
+       (save-excursion
+        (goto-char (point-max))
+        (message-forward-make-body-mime gnus-original-article-buffer))))
     (gnus-configure-windows 'message t)))
 
 (provide 'gnus-msg)



reply via email to

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