diff options
| author | Lars Ingebrigtsen | 2018-04-15 18:02:50 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2018-04-15 18:02:50 +0200 |
| commit | bea6ae4e3e0814a4dbc81655d9e5ac36064bec1d (patch) | |
| tree | 9761ca6114b50c8cca3862e2a460e0bd41555ec9 | |
| parent | c3ca885f4931a3b17b7e826cc866550d264d685a (diff) | |
| download | emacs-bea6ae4e3e0814a4dbc81655d9e5ac36064bec1d.tar.gz emacs-bea6ae4e3e0814a4dbc81655d9e5ac36064bec1d.zip | |
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.
| -rw-r--r-- | doc/misc/gnus.texi | 9 | ||||
| -rw-r--r-- | etc/NEWS | 6 | ||||
| -rw-r--r-- | lisp/gnus/gnus-msg.el | 31 | ||||
| -rw-r--r-- | lisp/gnus/gnus-sum.el | 1 |
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 | |||
| 5850 | what message buffer you want to yank into, and understands the | 5850 | what message buffer you want to yank into, and understands the |
| 5851 | process/prefix convention (@pxref{Process/Prefix}). | 5851 | process/prefix convention (@pxref{Process/Prefix}). |
| 5852 | 5852 | ||
| 5853 | @item S A | ||
| 5854 | @kindex S A @r{(Summary)} | ||
| 5855 | @findex gnus-summary-attach-article | ||
| 5856 | Attach the current article into an already existing Message | ||
| 5857 | composition buffer (@code{gnus-summary-yank-message}). If no such | ||
| 5858 | buffer exists, a new one is created. This command prompts for what | ||
| 5859 | message buffer you want to yank into, and understands the | ||
| 5860 | process/prefix convention (@pxref{Process/Prefix}). | ||
| 5861 | |||
| 5853 | @end table | 5862 | @end table |
| 5854 | 5863 | ||
| 5855 | 5864 | ||
| @@ -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 | ||
| 216 | article(s) to a pre-existing Message buffer, or create a new Message | ||
| 217 | buffer 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. | ||
| 2006 | If any current in-progress Message buffers exist, the articles | ||
| 2007 | can be attached to them. If not, a new Message buffer is | ||
| 2008 | created. | ||
| 2009 | |||
| 2010 | This command uses the process/prefix convention, so if you | ||
| 2011 | process-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"] |