Gnus development mailing list
 help / color / mirror / Atom feed
From: Sean Neakums <sneakums@zork.net>
Subject: RFE: gnus-summary-mail-forward with process marks
Date: Sat, 17 Nov 2001 19:23:34 +0000	[thread overview]
Message-ID: <6uy9l5jj61.fsf@zork.zork.net> (raw)

It'd be nifty (and more intuitive) if gnus-summary-mail-forward could
punt to gnus-uu-digest-mail-forward when process marks are set.

The following hack (only two new lines of code have been added,
despite the number of patched lines) does this, but probably not in
the best way.  Call it a proof-of-concept, I guess.

--- gnus-msg.el~	Sat Nov 17 19:16:46 2001
+++ gnus-msg.el	Sat Nov 17 19:18:30 2001
@@ -867,7 +867,7 @@
    (gnus-summary-work-articles n) t (gnus-summary-work-articles n)))
 
 (defun gnus-summary-mail-forward (&optional arg post)
-  "Forward the current message to another user.
+  "Forward the current message(s) to another user.
 If ARG is nil, see `message-forward-as-mime' and `message-forward-show-mml';
 if ARG is 1, decode the message and forward directly inline;
 if ARG is 2, forward message as an rfc822 MIME section;
@@ -878,31 +878,33 @@
 For the `inline' alternatives, also see the variable
 `message-forward-ignored-headers'."
   (interactive "P")
-  (let ((message-forward-as-mime message-forward-as-mime)
-	(message-forward-show-mml message-forward-show-mml))
-    (cond
-     ((null arg))
-     ((eq arg 1)
-      (setq message-forward-as-mime nil
-	    message-forward-show-mml t))
-     ((eq arg 2)
-      (setq message-forward-as-mime t
-	    message-forward-show-mml nil))
-     ((eq arg 3)
-      (setq message-forward-as-mime t
-	    message-forward-show-mml t))
-     ((eq arg 4)
-      (setq message-forward-as-mime nil
-	    message-forward-show-mml nil))
-     (t
-      (setq message-forward-as-mime (not message-forward-as-mime))))
-    (let ((gnus-article-reply (gnus-summary-article-number)))
-      (gnus-setup-message 'forward
-	(gnus-summary-select-article)
-	(let ((mail-parse-charset gnus-newsgroup-charset)
-	      (mail-parse-ignored-charsets gnus-newsgroup-ignored-charsets))
-	  (set-buffer gnus-original-article-buffer)
-	  (message-forward post))))))
+  (if (null (cdr (gnus-summary-work-articles nil)))
+      (let ((message-forward-as-mime message-forward-as-mime)
+            (message-forward-show-mml message-forward-show-mml))
+        (cond
+         ((null arg))
+         ((eq arg 1)
+          (setq message-forward-as-mime nil
+                message-forward-show-mml t))
+         ((eq arg 2)
+          (setq message-forward-as-mime t
+                message-forward-show-mml nil))
+         ((eq arg 3)
+          (setq message-forward-as-mime t
+                message-forward-show-mml t))
+         ((eq arg 4)
+          (setq message-forward-as-mime nil
+                message-forward-show-mml nil))
+         (t
+          (setq message-forward-as-mime (not message-forward-as-mime))))
+        (let ((gnus-article-reply (gnus-summary-article-number)))
+          (gnus-setup-message 'forward
+            (gnus-summary-select-article)
+            (let ((mail-parse-charset gnus-newsgroup-charset)
+                  (mail-parse-ignored-charsets gnus-newsgroup-ignored-charsets))
+              (set-buffer gnus-original-article-buffer)
+              (message-forward post)))))
+    (gnus-uu-digest-mail-forward arg post)))
 
 (defun gnus-summary-resend-message (address n)
   "Resend the current article to ADDRESS."


-- 
 /////////////////  |                  | The spark of a pin
<sneakums@zork.net> |  (require 'gnu)  | dropping, falling feather-like.
 \\\\\\\\\\\\\\\\\  |                  | There is too much noise.



             reply	other threads:[~2001-11-17 19:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-17 19:23 Sean Neakums [this message]
2001-12-14  3:06 ` ShengHuo ZHU
2001-12-29  3:43 ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6uy9l5jj61.fsf@zork.zork.net \
    --to=sneakums@zork.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).