aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Abrahamsen2020-01-18 11:08:11 -0800
committerEric Abrahamsen2020-01-18 11:08:11 -0800
commit447bb1313a6abc07776d93ee78cd976ab43856e5 (patch)
tree9b52c4d9ac00cd0e98233b995bdacec0c038f2ef
parenta4610c3dca09c526d7ca0647fe4a2abd08d081e7 (diff)
downloademacs-447bb1313a6abc07776d93ee78cd976ab43856e5.tar.gz
emacs-447bb1313a6abc07776d93ee78cd976ab43856e5.zip
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.
-rw-r--r--lisp/gnus/gnus-msg.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index 466a62713ed..daaea3980b5 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."
1985 buffers t nil nil (car buffers)))) 1985 buffers t nil nil (car buffers))))
1986 (gnus-summary-mail-other-window) 1986 (gnus-summary-mail-other-window)
1987 (setq destination (current-buffer))) 1987 (setq destination (current-buffer)))
1988 (gnus-summary-expand-window)
1988 (gnus-summary-iterate n 1989 (gnus-summary-iterate n
1989 (gnus-summary-select-article) 1990 (gnus-summary-select-article)
1990 (set-buffer destination) 1991 (with-current-buffer destination
1991 ;; Attach at the end of the buffer. 1992 ;; Attach at the end of the buffer.
1992 (save-excursion 1993 (save-excursion
1993 (goto-char (point-max)) 1994 (goto-char (point-max))
1994 (message-forward-make-body-mime gnus-original-article-buffer))) 1995 (message-forward-make-body-mime gnus-original-article-buffer))))
1995 (gnus-configure-windows 'message t))) 1996 (gnus-configure-windows 'message t)))
1996 1997
1997(provide 'gnus-msg) 1998(provide 'gnus-msg)