Add new command `gnus-summary-attach-article'
* doc/misc/gnus.texi (Summary Message Commands): Document it. * lisp/gnus/gnus-msg.el (gnus-summary-attach-article): New command and keystroke (bug#19788). * lisp/gnus/gnus-sum.el (gnus-summary-make-menu-bar): Menu bar entry for it.
This commit is contained in:
parent
c3ca885f49
commit
bea6ae4e3e
4 changed files with 47 additions and 0 deletions
|
@ -5850,6 +5850,15 @@ buffer (@code{gnus-summary-yank-message}). This command prompts for
|
|||
what message buffer you want to yank into, and understands the
|
||||
process/prefix convention (@pxref{Process/Prefix}).
|
||||
|
||||
@item S A
|
||||
@kindex S A @r{(Summary)}
|
||||
@findex gnus-summary-attach-article
|
||||
Attach the current article into an already existing Message
|
||||
composition buffer (@code{gnus-summary-yank-message}). If no such
|
||||
buffer exists, a new one is created. This command prompts for what
|
||||
message buffer you want to yank into, and understands the
|
||||
process/prefix convention (@pxref{Process/Prefix}).
|
||||
|
||||
@end table
|
||||
|
||||
|
||||
|
|
6
etc/NEWS
6
etc/NEWS
|
@ -210,6 +210,12 @@ concept index in the Gnus manual for the `match-list' entry.
|
|||
+++
|
||||
*** nil is no longer an allowed value for `mm-text-html-renderer'.
|
||||
|
||||
+++
|
||||
*** A new Gnus summary mode command, `S A'
|
||||
(`gnus-summary-attach-article') can be used to attach the current
|
||||
article(s) to a pre-existing Message buffer, or create a new Message
|
||||
buffer with the article(s) attached.
|
||||
|
||||
** erc
|
||||
|
||||
---
|
||||
|
|
|
@ -393,6 +393,7 @@ Thank you for your help in stamping out bugs.
|
|||
"N" gnus-summary-followup-to-mail-with-original
|
||||
"m" gnus-summary-mail-other-window
|
||||
"u" gnus-uu-post-news
|
||||
"A" gnus-summary-attach-article
|
||||
"\M-c" gnus-summary-mail-crosspost-complaint
|
||||
"Br" gnus-summary-reply-broken-reply-to
|
||||
"BR" gnus-summary-reply-broken-reply-to-with-original
|
||||
|
@ -2000,6 +2001,36 @@ this is a reply."
|
|||
(insert "From: " (message-make-from) "\n"))))
|
||||
nil 'local)))))
|
||||
|
||||
(defun gnus-summary-attach-article (n)
|
||||
"Attach the current article(s) to an outgoing Message buffer.
|
||||
If any current in-progress Message buffers exist, the articles
|
||||
can be attached to them. If not, a new Message buffer is
|
||||
created.
|
||||
|
||||
This command uses the process/prefix convention, so if you
|
||||
process-mark several articles, they will all be attached."
|
||||
(interactive "P")
|
||||
(let ((buffers (message-buffers))
|
||||
destination)
|
||||
;; Set up the destination mail composition buffer.
|
||||
(if (and buffers
|
||||
(y-or-n-p "Attach files to existing mail composition buffer? "))
|
||||
(setq destination
|
||||
(if (= (length buffers) 1)
|
||||
(get-buffer (car buffers))
|
||||
(gnus-completing-read "Attach to buffer"
|
||||
buffers t nil nil (car buffers))))
|
||||
(gnus-summary-mail-other-window)
|
||||
(setq destination (current-buffer)))
|
||||
(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)))
|
||||
(gnus-configure-windows 'message t)))
|
||||
|
||||
(provide 'gnus-msg)
|
||||
|
||||
;;; gnus-msg.el ends here
|
||||
|
|
|
@ -2629,6 +2629,7 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs))))
|
|||
["Resend message edit" gnus-summary-resend-message-edit t]
|
||||
["Send bounced mail" gnus-summary-resend-bounced-mail t]
|
||||
["Send a mail" gnus-summary-mail-other-window t]
|
||||
["Attach article to a message" gnus-summary-attach-article t]
|
||||
["Create a local message" gnus-summary-news-other-window t]
|
||||
["Uuencode and post" gnus-uu-post-news
|
||||
:help "Post a uuencoded article"]
|
||||
|
|
Loading…
Add table
Reference in a new issue