Gnus development mailing list
 help / color / mirror / Atom feed
* reducing headers in gnus-summary-mail-forward ARG 4
@ 2004-10-18 18:52 Ted Stern
  2004-11-08 20:13 ` Ted Stern
  0 siblings, 1 reply; 7+ messages in thread
From: Ted Stern @ 2004-10-18 18:52 UTC (permalink / raw)


I'm wondering how to reduce the number of headers in the ARG 4 option to
gnus-summary-mail-forward but not in any of the other options.

Changing message-forward-ignored-headers is not satisfactory -- this changes
the number of headers in the nil option but not the ARG 4 option.

,----[ gnus-summary-mail-forward documentation ]
| C-c C-f runs the command gnus-summary-mail-forward
|    which is an interactive compiled Lisp function in `gnus-msg'.
| (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'.
`----

-- 
 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)




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: reducing headers in gnus-summary-mail-forward ARG 4
  2004-10-18 18:52 reducing headers in gnus-summary-mail-forward ARG 4 Ted Stern
@ 2004-11-08 20:13 ` Ted Stern
  2004-11-09 11:06   ` Kai Grossjohann
  0 siblings, 1 reply; 7+ messages in thread
From: Ted Stern @ 2004-11-08 20:13 UTC (permalink / raw)


Hi,

Nobody ever commented on this.

What I want to do is forward email with a format like

     ----Forwarded message follows: -----

     ----End Forwarded Message-----------

This is for cases when I don't really care about preserving headers, or when I
have to email with colleagues who still use /usr/bin/mail (!) and don't like
all the headers.

If I use M-4 C-c C-f, I get the correct wrapper, but it includes nearly 40
lines of irrelevant headers.

S O m is tolerable but puts the actual message into a digest, which can be
somewhat confusing.

-- Ted

On 18 Oct 2004 at 11:52 PDT, Ted Stern wrote:
> I'm wondering how to reduce the number of headers in the ARG 4 option to
> gnus-summary-mail-forward but not in any of the other options.
>
> Changing message-forward-ignored-headers is not satisfactory -- this changes
> the number of headers in the nil option but not the ARG 4 option.
>
> ,----[ gnus-summary-mail-forward documentation ]
> | C-c C-f runs the command gnus-summary-mail-forward
> |    which is an interactive compiled Lisp function in `gnus-msg'.
> | (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'.
> `----




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: reducing headers in gnus-summary-mail-forward ARG 4
  2004-11-08 20:13 ` Ted Stern
@ 2004-11-09 11:06   ` Kai Grossjohann
  2004-11-09 17:40     ` Ted Stern
  0 siblings, 1 reply; 7+ messages in thread
From: Kai Grossjohann @ 2004-11-09 11:06 UTC (permalink / raw)


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?

Kai



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: reducing headers in gnus-summary-mail-forward ARG 4
  2004-11-09 11:06   ` Kai Grossjohann
@ 2004-11-09 17:40     ` Ted Stern
  2004-11-10  8:02       ` Kai Grossjohann
  0 siblings, 1 reply; 7+ messages in thread
From: Ted Stern @ 2004-11-09 17:40 UTC (permalink / raw)


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.

I want to be able to still forward messages as attachments with all headers
intact so that I can forward spam to admins, etc.

Ted
-- 
 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)




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: reducing headers in gnus-summary-mail-forward ARG 4
  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
  0 siblings, 2 replies; 7+ messages in thread
From: Kai Grossjohann @ 2004-11-10  8:02 UTC (permalink / raw)


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




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: reducing headers in gnus-summary-mail-forward ARG 4
  2004-11-10  8:02       ` Kai Grossjohann
@ 2004-11-17  0:27         ` Ted Stern
  2004-11-18 20:43         ` Ted Stern
  1 sibling, 0 replies; 7+ messages in thread
From: Ted Stern @ 2004-11-17  0:27 UTC (permalink / raw)


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

Thanks Kai,

Sorry for my slow reply -- I haven't been able to access Gmane via Gnus for
nearly a week.

I must confess, I'm pretty good at installing Emacs packages, but I am
terrible at elisp programming.

Could I do this with a defadvice wrapper?
-- 
 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)




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: reducing headers in gnus-summary-mail-forward ARG 4
  2004-11-10  8:02       ` Kai Grossjohann
  2004-11-17  0:27         ` Ted Stern
@ 2004-11-18 20:43         ` Ted Stern
  1 sibling, 0 replies; 7+ messages in thread
From: Ted Stern @ 2004-11-18 20:43 UTC (permalink / raw)


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)




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-11-18 20:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-18 18:52 reducing headers in gnus-summary-mail-forward ARG 4 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 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).