emacs-diffs
[Top][All Lists]
Advanced

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

master f4d186b 1/2: Allow not selecting messages in Gnus before resendin


From: Lars Ingebrigtsen
Subject: master f4d186b 1/2: Allow not selecting messages in Gnus before resending
Date: Sun, 20 Sep 2020 18:27:30 -0400 (EDT)

branch: master
commit f4d186b3b80c513338d6c7ddaef75f5aaa5c1dcb
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Allow not selecting messages in Gnus before resending
    
    * lisp/gnus/gnus-msg.el (gnus-summary-resend-message): Allow not
    selecting messages.  This is faster when resending huge spam messages.
---
 lisp/gnus/gnus-msg.el | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index 7bc7fb5..465871e 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -1352,8 +1352,10 @@ For the \"inline\" alternatives, also see the variable
                                      gcc)))
               (insert "Gcc: " (mapconcat 'identity gcc ", ") "\n")))))))
 
-(defun gnus-summary-resend-message (address n)
-  "Resend the current article to ADDRESS."
+(defun gnus-summary-resend-message (address n &optional no-select)
+  "Resend the current article to ADDRESS.
+Uses the process/prefix convention.  If NO-SELECT, don't display
+the message before resending."
   (interactive
    (list (message-read-from-minibuffer
          "Resend message(s) to: "
@@ -1372,6 +1374,7 @@ For the \"inline\" alternatives, also see the variable
                                           'posting-style t))
        (user-full-name user-full-name)
        (user-mail-address user-mail-address)
+       (group gnus-newsgroup-name)
        tem)
     (dolist (style styles)
       (when (stringp (cadr style))
@@ -1395,11 +1398,18 @@ For the \"inline\" alternatives, also see the variable
                        '(gnus-agent-possibly-do-gcc)
                      '(gnus-inews-do-gcc)))))
     (dolist (article (gnus-summary-work-articles n))
-      (gnus-summary-select-article nil nil nil article)
-      (with-current-buffer gnus-original-article-buffer
-       (let ((gnus-gcc-externalize-attachments nil)
-             (message-inhibit-body-encoding t))
-         (message-resend address)))
+      (if no-select
+         (with-current-buffer " *nntpd*"
+           (erase-buffer)
+           (gnus-request-article article group)
+           (let ((gnus-gcc-externalize-attachments nil)
+                 (message-inhibit-body-encoding t))
+             (message-resend address)))
+       (gnus-summary-select-article nil nil nil article)
+       (with-current-buffer gnus-original-article-buffer
+         (let ((gnus-gcc-externalize-attachments nil)
+               (message-inhibit-body-encoding t))
+           (message-resend address))))
       (gnus-summary-mark-article-as-forwarded article))))
 
 ;; From: Matthieu Moy <Matthieu.Moy@imag.fr>



reply via email to

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