Gnus development mailing list
 help / color / mirror / Atom feed
* Questions about mail forwarding
@ 2012-04-13  6:06 mihkel
  2012-04-13 20:40 ` Adam Sjøgren
  0 siblings, 1 reply; 4+ messages in thread
From: mihkel @ 2012-04-13  6:06 UTC (permalink / raw)
  To: ding

Hi all.

I have a few questions about mail forwarding.

1. I want forwarded messages to be sent as inline, so I added the
following to my gnus init file:

    (setq gnus-summary-mail-forward 1)

But it does not work. I get this: #mml type=message/rfc822
disposition=inline at the begginnig of the forwarded mail. When I do C-u
1 C-c C-f I get what I want. But doing this every time I want to forward
a message is a pain.

2. I want to have only some headers included in the forwarded mail. So I
used the following snippet:

    (setq message-included-forward-headers
     "^Subject:\\|^To:\\|^Cc:\\|^From:\\|^Date:")

Again, it does not work. All headers are displayed. So my question is:
what I'm doing wrong :)


mihkel
the n00b




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

* Re: Questions about mail forwarding
  2012-04-13  6:06 Questions about mail forwarding mihkel
@ 2012-04-13 20:40 ` Adam Sjøgren
  2012-04-13 23:27   ` Michael Welsh Duggan
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Sjøgren @ 2012-04-13 20:40 UTC (permalink / raw)
  To: ding

On Fri, 13 Apr 2012 09:06:35 +0300, mihkel wrote:

>     (setq gnus-summary-mail-forward 1)

Setting a variable with the same name as a function doesn't change what
the function does.

,----[ C-h f gnus-summary-mail-forward RET ]
| gnus-summary-mail-forward is an interactive compiled Lisp function in
| `gnus-msg.el'.
| 
| (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'.
`----

What you want to do is to pass the optional ARG to the function.

I.e. you press: C-u 1 C-c C-f instead of just C-c C-f to forward the
email.

> 2. I want to have only some headers included in the forwarded mail. So I
> used the following snippet:

>     (setq message-included-forward-headers
>      "^Subject:\\|^To:\\|^Cc:\\|^From:\\|^Date:")

Where did you get that from?

The changelog.1 file says that that variable was removed. In 1999:

  "1999-02-09 15:25:52  Lars Magne Ingebrigtsen  <larsi@gnus.org>
   [...]
           (message-included-forward-headers): Removed."

> Again, it does not work. All headers are displayed. So my question is:
> what I'm doing wrong :)

I think you are collecting your snippets of configuration from very
strange places :-)


  Best regards,

    Adam

-- 
 "You have to photosynthesize"                                Adam Sjøgren
                                                         asjo@koldfront.dk




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

* Re: Questions about mail forwarding
  2012-04-13 20:40 ` Adam Sjøgren
@ 2012-04-13 23:27   ` Michael Welsh Duggan
  2012-04-14  8:29     ` mihkel
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Welsh Duggan @ 2012-04-13 23:27 UTC (permalink / raw)
  To: ding

asjo@koldfront.dk (Adam Sjøgren) writes:

> On Fri, 13 Apr 2012 09:06:35 +0300, mihkel wrote:
>
>>     (setq gnus-summary-mail-forward 1)
>
> Setting a variable with the same name as a function doesn't change what
> the function does.
>
> ,----[ C-h f gnus-summary-mail-forward RET ]
> | gnus-summary-mail-forward is an interactive compiled Lisp function in
> | `gnus-msg.el'.
> | 
> | (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'.
> `----
>
> What you want to do is to pass the optional ARG to the function.
>
> I.e. you press: C-u 1 C-c C-f instead of just C-c C-f to forward the
> email.

Or, also per the documentation, you can set message-forward-as-mime to
nil.


>> 2. I want to have only some headers included in the forwarded mail. So I
>> used the following snippet:
>
>>     (setq message-included-forward-headers
>>      "^Subject:\\|^To:\\|^Cc:\\|^From:\\|^Date:")

Unfortunately the variable now appears to be
message-forward-ignored-headers, which is really doing the opposite of
what you want.

-- 
Michael Welsh Duggan
(md5i@md5i.com)



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

* Re: Questions about mail forwarding
  2012-04-13 23:27   ` Michael Welsh Duggan
@ 2012-04-14  8:29     ` mihkel
  0 siblings, 0 replies; 4+ messages in thread
From: mihkel @ 2012-04-14  8:29 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 780 bytes --]

Michael Welsh Duggan <md5i@md5i.com> writes:

> Or, also per the documentation, you can set message-forward-as-mime to
> nil.

Thanks for the tip. Now it is working the way I want.


> Unfortunately the variable now appears to be
> message-forward-ignored-headers, which is really doing the opposite of
> what you want.

Indeed. I google my snippets usually. Thats the reason I stumbled across
deprecated message-included-forward-headers. I was aware of
message-forward-ignored-headers, but since there are so many headers :)
I thought there has to be a better way to get rid most of them. Its a
shame it got remove in 1999. I could really use in 2012. I guess I have
to use the next best thing:

   (setq message-forward-ignored-headers "^.*")

   
mihkel

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

end of thread, other threads:[~2012-04-14  8:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-13  6:06 Questions about mail forwarding mihkel
2012-04-13 20:40 ` Adam Sjøgren
2012-04-13 23:27   ` Michael Welsh Duggan
2012-04-14  8:29     ` mihkel

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