* bug#67520: 29.1; Mention headers
@ 2023-11-29 3:49 Dan Jacobson
2023-11-29 12:56 ` Eli Zaretskii
0 siblings, 1 reply; 12+ messages in thread
From: Dan Jacobson @ 2023-11-29 3:49 UTC (permalink / raw)
To: 67520
This docstring should mention the case where the user wants to forward
the entire message, including pristine headers.
He tries each in vain, finding that none include the headers.
C-c C-f runs the command gnus-summary-mail-forward (found in
gnus-summary-mode-map), which is an autoloaded interactive
native-compiled Lisp function in ‘gnus-msg.el’.
It is bound to C-c C-f and S o m.
(gnus-summary-mail-forward &optional ARG POST)
Forward the current message(s) to another user.
If process marks exist, forward all marked messages;
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;
if ARG is 3, decode message and forward as an rfc822 MIME section;
if ARG is 4, forward message directly inline;
otherwise, use flipped ‘message-forward-as-mime’.
If POST, post instead of mail.
For the "inline" alternatives, also see the variable
‘message-forward-ignored-headers’.
[back]
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#67520: 29.1; Mention headers
2023-11-29 3:49 bug#67520: 29.1; Mention headers Dan Jacobson
@ 2023-11-29 12:56 ` Eli Zaretskii
2023-11-29 15:31 ` Eric Abrahamsen
0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2023-11-29 12:56 UTC (permalink / raw)
To: Dan Jacobson, Eric Abrahamsen; +Cc: 67520
> From: Dan Jacobson <jidanni@jidanni.org>
> Date: Wed, 29 Nov 2023 11:49:18 +0800
>
> This docstring should mention the case where the user wants to forward
> the entire message, including pristine headers.
>
> He tries each in vain, finding that none include the headers.
>
> C-c C-f runs the command gnus-summary-mail-forward (found in
> gnus-summary-mode-map), which is an autoloaded interactive
> native-compiled Lisp function in ‘gnus-msg.el’.
>
> It is bound to C-c C-f and S o m.
>
> (gnus-summary-mail-forward &optional ARG POST)
>
> Forward the current message(s) to another user.
> If process marks exist, forward all marked messages;
> 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;
> if ARG is 3, decode message and forward as an rfc822 MIME section;
> if ARG is 4, forward message directly inline;
> otherwise, use flipped ‘message-forward-as-mime’.
> If POST, post instead of mail.
> For the "inline" alternatives, also see the variable
> ‘message-forward-ignored-headers’.
Eric, any comments?
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#67520: 29.1; Mention headers
2023-11-29 12:56 ` Eli Zaretskii
@ 2023-11-29 15:31 ` Eric Abrahamsen
2023-11-30 6:02 ` Dan Jacobson
0 siblings, 1 reply; 12+ messages in thread
From: Eric Abrahamsen @ 2023-11-29 15:31 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 67520, Dan Jacobson
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Dan Jacobson <jidanni@jidanni.org>
>> Date: Wed, 29 Nov 2023 11:49:18 +0800
>>
>> This docstring should mention the case where the user wants to forward
>> the entire message, including pristine headers.
>>
>> He tries each in vain, finding that none include the headers.
>>
>> C-c C-f runs the command gnus-summary-mail-forward (found in
>> gnus-summary-mode-map), which is an autoloaded interactive
>> native-compiled Lisp function in ‘gnus-msg.el’.
>>
>> It is bound to C-c C-f and S o m.
>>
>> (gnus-summary-mail-forward &optional ARG POST)
>>
>> Forward the current message(s) to another user.
>> If process marks exist, forward all marked messages;
>> 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;
>> if ARG is 3, decode message and forward as an rfc822 MIME section;
>> if ARG is 4, forward message directly inline;
>> otherwise, use flipped ‘message-forward-as-mime’.
>> If POST, post instead of mail.
>> For the "inline" alternatives, also see the variable
>> ‘message-forward-ignored-headers’.
>
> Eric, any comments?
I didn't understand the request. The docstring should mention that none
of the calling options for `gnus-summary-mail-forward' include the all
the original headers?
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#67520: 29.1; Mention headers
2023-11-29 15:31 ` Eric Abrahamsen
@ 2023-11-30 6:02 ` Dan Jacobson
2023-12-04 1:39 ` Eric Abrahamsen
0 siblings, 1 reply; 12+ messages in thread
From: Dan Jacobson @ 2023-11-30 6:02 UTC (permalink / raw)
To: Eric Abrahamsen; +Cc: Eli Zaretskii, 67520
EA> I didn't understand the request. The docstring should mention that none
EA> of the calling options for `gnus-summary-mail-forward' include the all
EA> the original headers?
Yes. Please add to the docstring:
"This command does not forward headers along with the message.
To do so, use ........ instead."
(As half of users want to forward the headers along with the
message and the other half of the users don't.)
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#67520: 29.1; Mention headers
2023-11-30 6:02 ` Dan Jacobson
@ 2023-12-04 1:39 ` Eric Abrahamsen
2023-12-04 3:30 ` Dan Jacobson
0 siblings, 1 reply; 12+ messages in thread
From: Eric Abrahamsen @ 2023-12-04 1:39 UTC (permalink / raw)
To: Dan Jacobson; +Cc: Eli Zaretskii, 67520
Dan Jacobson <jidanni@jidanni.org> writes:
> EA> I didn't understand the request. The docstring should mention that none
> EA> of the calling options for `gnus-summary-mail-forward' include the all
> EA> the original headers?
>
> Yes. Please add to the docstring:
>
> "This command does not forward headers along with the message.
> To do so, use ........ instead."
>
> (As half of users want to forward the headers along with the
> message and the other half of the users don't.)
Sorry, I'm still being slow here -- what are we suggesting the user use
instead? What goes in the ellipses?
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#67520: 29.1; Mention headers
2023-12-04 1:39 ` Eric Abrahamsen
@ 2023-12-04 3:30 ` Dan Jacobson
2023-12-05 4:26 ` Eric Abrahamsen
0 siblings, 1 reply; 12+ messages in thread
From: Dan Jacobson @ 2023-12-04 3:30 UTC (permalink / raw)
To: Eric Abrahamsen; +Cc: Eli Zaretskii, 67520
OK, then ths is a feature request. Users are often asked to forward
complete pristine emails to various abuse investigation departments.
Gnus should offer such functionality.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#67520: 29.1; Mention headers
2023-12-04 3:30 ` Dan Jacobson
@ 2023-12-05 4:26 ` Eric Abrahamsen
2023-12-05 5:06 ` Dan Jacobson
0 siblings, 1 reply; 12+ messages in thread
From: Eric Abrahamsen @ 2023-12-05 4:26 UTC (permalink / raw)
To: Dan Jacobson; +Cc: Eli Zaretskii, 67520
On 12/04/23 11:30 AM, Dan Jacobson wrote:
> OK, then ths is a feature request. Users are often asked to forward
> complete pristine emails to various abuse investigation departments.
> Gnus should offer such functionality.
Okay, that's clearer! message.el is fairly convoluted, but it comes down
to `message-remove-ignored-headers'. That consults several options,
most importantly `message-forward-ignored-headers' and
`message-forward-included-headers'. The ignored headers are removed, as
you'd expect, but if anything at all is in the included headers, *only*
those included headers are... included. You lose everything else.
So what you really want is the option to (perhaps temporarily) set
`message-forward-included-headers' to nil. (Please try it out and
confirm.)
And the real question is how to offer this option to the user.
Everything is already thoroughly overloaded...
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#67520: 29.1; Mention headers
2023-12-05 4:26 ` Eric Abrahamsen
@ 2023-12-05 5:06 ` Dan Jacobson
2023-12-06 15:09 ` Eric Abrahamsen
0 siblings, 1 reply; 12+ messages in thread
From: Dan Jacobson @ 2023-12-05 5:06 UTC (permalink / raw)
To: Eric Abrahamsen; +Cc: Eli Zaretskii, 67520
>>>>> "EA" == Eric Abrahamsen <eric@ericabrahamsen.net> writes:
EA> And the real question is how to offer this option to the user.
EA> Everything is already thoroughly overloaded...
Yup, I just tested it and the only difference with the message before
gnus got its hands one it was
0a1
> From nobody Tue Dec 5 13:00:45 2023
65a67
> X-Gnus-Mail-Source: maildir:~/Maildir/new
67a70,71
> MIME-Version: 1.0
> Content-Type: text/plain
89a94
>
And it is good that the X-Gnus-Mail-Source doesn't show up in the
forwarded message too.
So you are on the right track.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#67520: 29.1; Mention headers
2023-12-05 5:06 ` Dan Jacobson
@ 2023-12-06 15:09 ` Eric Abrahamsen
2023-12-08 5:17 ` Dan Jacobson
0 siblings, 1 reply; 12+ messages in thread
From: Eric Abrahamsen @ 2023-12-06 15:09 UTC (permalink / raw)
To: Dan Jacobson; +Cc: Eli Zaretskii, 67520
On 12/05/23 13:06 PM, Dan Jacobson wrote:
>>>>>> "EA" == Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
> EA> And the real question is how to offer this option to the user.
> EA> Everything is already thoroughly overloaded...
>
> Yup, I just tested it and the only difference with the message before
> gnus got its hands one it was
>
> 0a1
>> From nobody Tue Dec 5 13:00:45 2023
> 65a67
>> X-Gnus-Mail-Source: maildir:~/Maildir/new
> 67a70,71
>> MIME-Version: 1.0
>> Content-Type: text/plain
> 89a94
>>
>
> And it is good that the X-Gnus-Mail-Source doesn't show up in the
> forwarded message too.
>
> So you are on the right track.
What I can offer you is a "symbolic prefix" (see the Gnus manual section
of the same name). What that means is that, in addition to the usual
numerical prefixes, you could also type "M-i a" before the command ("a"
here standing for "all headers") and the forwarding code would let-bind
`message-forward-included-headers' to nil.
That's the best I can come up with.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#67520: 29.1; Mention headers
2023-12-06 15:09 ` Eric Abrahamsen
@ 2023-12-08 5:17 ` Dan Jacobson
2023-12-08 17:42 ` Eric Abrahamsen
0 siblings, 1 reply; 12+ messages in thread
From: Dan Jacobson @ 2023-12-08 5:17 UTC (permalink / raw)
To: Eric Abrahamsen; +Cc: Eli Zaretskii, 67520
OK, great. Now all that needs to be done is when the user types C-h C-c C-f
they should see at the bottom:
-----
To include ALL headers in your forwarded message, use
M-i a C-c C-f
------
And of course C-c C-f runs the command gnus-summary-mail-forward needs
to be changed to accept the prefix. (info "(gnus) Symbolic Prefixes")
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#67520: 29.1; Mention headers
2023-12-08 5:17 ` Dan Jacobson
@ 2023-12-08 17:42 ` Eric Abrahamsen
2023-12-08 22:24 ` jidanni
0 siblings, 1 reply; 12+ messages in thread
From: Eric Abrahamsen @ 2023-12-08 17:42 UTC (permalink / raw)
To: Dan Jacobson; +Cc: Eli Zaretskii, 67520
[-- Attachment #1: Type: text/plain, Size: 421 bytes --]
On 12/08/23 13:17 PM, Dan Jacobson wrote:
> OK, great. Now all that needs to be done is when the user types C-h C-c C-f
> they should see at the bottom:
> -----
> To include ALL headers in your forwarded message, use
>
> M-i a C-c C-f
> ------
> And of course C-c C-f runs the command gnus-summary-mail-forward needs
> to be changed to accept the prefix. (info "(gnus) Symbolic Prefixes")
Here's what I've got so far.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Provide-option-to-forward-Gnus-messages-with-all-mos.patch --]
[-- Type: text/x-patch, Size: 5259 bytes --]
From ef86e3be364cbdee3ff5d83d2d37bb31c1a9ba6b Mon Sep 17 00:00:00 2001
From: Eric Abrahamsen <eric@ericabrahamsen.net>
Date: Fri, 8 Dec 2023 09:39:58 -0800
Subject: [PATCH] Provide option to forward Gnus messages with all (most)
headers
* lisp/gnus/gnus-msg.el (gnus-summary-mail-forward): Accept symbolic
prefix to let-bind message-forward-included-headers to nil, which will
include most original message headers in the forwarded copy.
(gnus-summary-post-forward): Corresponding arglist update.
---
doc/misc/gnus.texi | 26 +++++++++++++++++---------
lisp/gnus/gnus-msg.el | 26 +++++++++++++++++---------
2 files changed, 34 insertions(+), 18 deletions(-)
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 586e4b94ba1..ead5954a96e 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -5868,15 +5868,23 @@ Summary Mail Commands
@findex gnus-summary-mail-forward
@c @icon{gnus-summary-mail-forward}
Forward the current article to some other person
-(@code{gnus-summary-mail-forward}). If no prefix is given, the message
-is forwarded according to the value of (@code{message-forward-as-mime})
-and (@code{message-forward-show-mml}); if the prefix is 1, decode the
-message and forward directly inline; if the prefix is 2, forward message
-as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
-forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
-directly inline; otherwise, the message is forwarded as no prefix given
-but use the flipped value of (@code{message-forward-as-mime}). By
-default, the forwarded message is inlined into the mail.
+(@code{gnus-summary-mail-forward}). If no prefix is given, the
+message is forwarded according to the value of
+(@code{message-forward-as-mime}) and
+(@code{message-forward-show-mml}); if the prefix is 1, decode the
+message and forward directly inline; if the prefix is 2, forward
+message as an rfc822 @acronym{MIME} section; if the prefix is 3,
+decode message and forward as an rfc822 @acronym{MIME} section; if the
+prefix is 4, forward message directly inline; otherwise, the message
+is forwarded as no prefix given but use the negated value of
+(@code{message-forward-as-mime}). By default, the forwarded message
+is inlined into the mail.
+
+Which headers from the original message are included in the forwarded
+message is determined by options specific to @code{message-mode},
+@pxref{Forwarding,,, message}. In addition, this command can be given
+the symbolic prefix @samp{a}, using @kbd{M-i a}, to include most original
+headers.
@item S m
@itemx m
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index b065ae34851..e503ccae00f 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -1209,7 +1209,7 @@ gnus-summary-very-wide-reply-with-original
(gnus-summary-reply
(gnus-summary-work-articles n) t (gnus-summary-work-articles n)))
-(defun gnus-summary-mail-forward (&optional arg post)
+(defun gnus-summary-mail-forward (&optional arg all-headers post)
"Forward the current message(s) to another user.
If process marks exist, forward all marked messages;
if ARG is nil, see `message-forward-as-mime' and `message-forward-show-mml';
@@ -1217,17 +1217,25 @@ gnus-summary-mail-forward
if ARG is 2, forward message as an rfc822 MIME section;
if ARG is 3, decode message and forward as an rfc822 MIME section;
if ARG is 4, forward message directly inline;
-otherwise, use flipped `message-forward-as-mime'.
+otherwise, use negated `message-forward-as-mime'.
If POST, post instead of mail.
-For the \"inline\" alternatives, also see the variable
-`message-forward-ignored-headers'."
- (interactive "P" gnus-summary-mode)
+If symbolic prefix ALL-HEADERS is the symbol `a', include all
+original headers in the forwarded message, except those matching
+`message-forward-ignored-headers'. Otherwise, include headers
+based on the options `message-forward-included-headers',
+`message-forward-ignored-headers', and potentially
+`message-forward-included-mime-headers'."
+ (interactive (gnus-interactive "P\ny") gnus-summary-mode)
(if (cdr (gnus-summary-work-articles nil))
;; Process marks are given.
(gnus-uu-digest-mail-forward nil post)
;; No process marks.
(let ((message-forward-as-mime message-forward-as-mime)
- (message-forward-show-mml message-forward-show-mml))
+ (message-forward-show-mml message-forward-show-mml)
+ (message-forward-included-headers
+ (if (eq all-headers 'a)
+ nil
+ message-forward-included-headers)))
(cond
((null arg))
((eq arg 1)
@@ -1380,11 +1388,11 @@ gnus-summary-resend-message-edit
(forward-char 1))
(widen)))))
-(defun gnus-summary-post-forward (&optional arg)
+(defun gnus-summary-post-forward (&optional arg all-headers)
"Forward the current article to a newsgroup.
See `gnus-summary-mail-forward' for ARG."
- (interactive "P" gnus-summary-mode)
- (gnus-summary-mail-forward arg t))
+ (interactive (gnus-interactive "P\ny") gnus-summary-mode)
+ (gnus-summary-mail-forward arg all-headers t))
(defun gnus-summary-mail-crosspost-complaint (n)
"Send a complaint about crossposting to the current article(s)."
--
2.43.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* bug#67520: 29.1; Mention headers
2023-12-08 17:42 ` Eric Abrahamsen
@ 2023-12-08 22:24 ` jidanni
0 siblings, 0 replies; 12+ messages in thread
From: jidanni @ 2023-12-08 22:24 UTC (permalink / raw)
To: Eric Abrahamsen; +Cc: Eli Zaretskii, 67520
Cool! Thanks for working on it.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2023-12-08 22:24 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-29 3:49 bug#67520: 29.1; Mention headers Dan Jacobson
2023-11-29 12:56 ` Eli Zaretskii
2023-11-29 15:31 ` Eric Abrahamsen
2023-11-30 6:02 ` Dan Jacobson
2023-12-04 1:39 ` Eric Abrahamsen
2023-12-04 3:30 ` Dan Jacobson
2023-12-05 4:26 ` Eric Abrahamsen
2023-12-05 5:06 ` Dan Jacobson
2023-12-06 15:09 ` Eric Abrahamsen
2023-12-08 5:17 ` Dan Jacobson
2023-12-08 17:42 ` Eric Abrahamsen
2023-12-08 22:24 ` jidanni
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).