aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/misc/gnus.texi9
-rw-r--r--etc/NEWS6
-rw-r--r--lisp/gnus/gnus-msg.el31
-rw-r--r--lisp/gnus/gnus-sum.el1
4 files changed, 47 insertions, 0 deletions
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index efda7f20b57..77c02182b4b 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -5850,6 +5850,15 @@ buffer (@code{gnus-summary-yank-message}). This command prompts for
5850what message buffer you want to yank into, and understands the 5850what message buffer you want to yank into, and understands the
5851process/prefix convention (@pxref{Process/Prefix}). 5851process/prefix convention (@pxref{Process/Prefix}).
5852 5852
5853@item S A
5854@kindex S A @r{(Summary)}
5855@findex gnus-summary-attach-article
5856Attach the current article into an already existing Message
5857composition buffer (@code{gnus-summary-yank-message}). If no such
5858buffer exists, a new one is created. This command prompts for what
5859message buffer you want to yank into, and understands the
5860process/prefix convention (@pxref{Process/Prefix}).
5861
5853@end table 5862@end table
5854 5863
5855 5864
diff --git a/etc/NEWS b/etc/NEWS
index 0c4daee9acf..13033797265 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -210,6 +210,12 @@ concept index in the Gnus manual for the `match-list' entry.
210+++ 210+++
211*** nil is no longer an allowed value for `mm-text-html-renderer'. 211*** nil is no longer an allowed value for `mm-text-html-renderer'.
212 212
213+++
214*** A new Gnus summary mode command, `S A'
215(`gnus-summary-attach-article') can be used to attach the current
216article(s) to a pre-existing Message buffer, or create a new Message
217buffer with the article(s) attached.
218
213** erc 219** erc
214 220
215--- 221---
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index d5610bff739..6505f90d3e8 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -393,6 +393,7 @@ Thank you for your help in stamping out bugs.
393 "N" gnus-summary-followup-to-mail-with-original 393 "N" gnus-summary-followup-to-mail-with-original
394 "m" gnus-summary-mail-other-window 394 "m" gnus-summary-mail-other-window
395 "u" gnus-uu-post-news 395 "u" gnus-uu-post-news
396 "A" gnus-summary-attach-article
396 "\M-c" gnus-summary-mail-crosspost-complaint 397 "\M-c" gnus-summary-mail-crosspost-complaint
397 "Br" gnus-summary-reply-broken-reply-to 398 "Br" gnus-summary-reply-broken-reply-to
398 "BR" gnus-summary-reply-broken-reply-to-with-original 399 "BR" gnus-summary-reply-broken-reply-to-with-original
@@ -2000,6 +2001,36 @@ this is a reply."
2000 (insert "From: " (message-make-from) "\n")))) 2001 (insert "From: " (message-make-from) "\n"))))
2001 nil 'local))))) 2002 nil 'local)))))
2002 2003
2004(defun gnus-summary-attach-article (n)
2005 "Attach the current article(s) to an outgoing Message buffer.
2006If any current in-progress Message buffers exist, the articles
2007can be attached to them. If not, a new Message buffer is
2008created.
2009
2010This command uses the process/prefix convention, so if you
2011process-mark several articles, they will all be attached."
2012 (interactive "P")
2013 (let ((buffers (message-buffers))
2014 destination)
2015 ;; Set up the destination mail composition buffer.
2016 (if (and buffers
2017 (y-or-n-p "Attach files to existing mail composition buffer? "))
2018 (setq destination
2019 (if (= (length buffers) 1)
2020 (get-buffer (car buffers))
2021 (gnus-completing-read "Attach to buffer"
2022 buffers t nil nil (car buffers))))
2023 (gnus-summary-mail-other-window)
2024 (setq destination (current-buffer)))
2025 (gnus-summary-iterate n
2026 (gnus-summary-select-article)
2027 (set-buffer destination)
2028 ;; Attach at the end of the buffer.
2029 (save-excursion
2030 (goto-char (point-max))
2031 (message-forward-make-body-mime gnus-original-article-buffer)))
2032 (gnus-configure-windows 'message t)))
2033
2003(provide 'gnus-msg) 2034(provide 'gnus-msg)
2004 2035
2005;;; gnus-msg.el ends here 2036;;; gnus-msg.el ends here
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index aed5aaf01eb..165d8f96490 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -2629,6 +2629,7 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs))))
2629 ["Resend message edit" gnus-summary-resend-message-edit t] 2629 ["Resend message edit" gnus-summary-resend-message-edit t]
2630 ["Send bounced mail" gnus-summary-resend-bounced-mail t] 2630 ["Send bounced mail" gnus-summary-resend-bounced-mail t]
2631 ["Send a mail" gnus-summary-mail-other-window t] 2631 ["Send a mail" gnus-summary-mail-other-window t]
2632 ["Attach article to a message" gnus-summary-attach-article t]
2632 ["Create a local message" gnus-summary-news-other-window t] 2633 ["Create a local message" gnus-summary-news-other-window t]
2633 ["Uuencode and post" gnus-uu-post-news 2634 ["Uuencode and post" gnus-uu-post-news
2634 :help "Post a uuencoded article"] 2635 :help "Post a uuencoded article"]