From: Ted Stern <stern+gnus@cray.com>
Subject: Re: reducing headers in gnus-summary-mail-forward ARG 4
Date: Thu, 18 Nov 2004 12:43:06 -0800 [thread overview]
Message-ID: <yccekiqdh2d.fsf@monkeypuzzle.wc.cray.com> (raw)
In-Reply-To: <864qjyp1x2.fsf@ketchup.de.uu.net>
On 10 Nov 2004 at 00:02 PST, Kai Grossjohann wrote:
> Ted Stern <stern+gnus@cray.com> writes:
>
>> On 9 Nov 2004 at 03:06 PST, Kai Grossjohann wrote:
>>> Ted Stern <stern+gnus@cray.com> writes:
>>>
>>>> If I use M-4 C-c C-f, I get the correct wrapper, but it includes nearly 40
>>>> lines of irrelevant headers.
>>>
>>> What does message-forward-ignored-headers do?
>>
>> It changes the headers in *all* forms of message forwarding. I want to reduce
>> the number of headers only the non-attachment form.
>
> Ah, I see. Well, then a small function that let-binds
> message-forward-ignored-headers around the invocation of
> gnus-summary-mail-forward seems to be the way to go.
>
> Kai
Here's my attempt. I used the defadvice opportunity to turn off
message-signature as well, since I don't like that in forwards. Oddly enough,
turning off the sig does work, but modifying the ignored headers does not.
Any suggestions? I have this in my .gnus if it makes any difference. Should
I byte-compile it and then load it before loading gnus?
-- Ted
;; Add a defadvice around gnus-summary-mail-forward to reset
;; message-forward-ignored-headers from
;; "^Content-Transfer-Encoding:\\|^X-Gnus" when the argument is
;; non-nil
;;
(defadvice gnus-summary-mail-forward
(around gnus-summary-mail-forward-around
(&optional prefix post)
activate)
"Reset message-forward-ignored-headers when ARG of `gnus-summary-mail-forward' is non-nil.
Turn off signature also."
(interactive "P")
(let ((message-signature nil) ; also turn off signature for fwds
(message-forward-ignored-headers
(if prefix
(concat "^"
(regexp-opt '(
"Content-"
"X"
"User"
"Received"
"Return"
"Message"
"MIME"
"References-"
"In-"
"Status"
"Lines"
"List")
t))
message-forward-ignored-headers)))
(message "message-forward-ignored-headers = `%s'" message-forward-ignored-headers)
ad-do-it)
)
--
Ted Stern Applications Group
Cray Inc. office: 206-701-2182
411 First Avenue South, Suite 600 cell: 206-383-1049
Seattle, WA 98104-2860 FAX: 206-701-2500
Frango ut patefaciam -- I break that I may reveal
(The Paleontological Society motto, equally apropos for debugging)
prev parent reply other threads:[~2004-11-18 20:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-18 18:52 Ted Stern
2004-11-08 20:13 ` Ted Stern
2004-11-09 11:06 ` Kai Grossjohann
2004-11-09 17:40 ` Ted Stern
2004-11-10 8:02 ` Kai Grossjohann
2004-11-17 0:27 ` Ted Stern
2004-11-18 20:43 ` Ted Stern [this message]
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=yccekiqdh2d.fsf@monkeypuzzle.wc.cray.com \
--to=stern+gnus@cray.com \
/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).