* Gnus: How to get/force specific header entries in a new message?
@ 2011-11-23 16:38 Marius Hofert
2011-11-23 18:30 ` Tassilo Horn
2011-11-23 18:40 ` Sivaram Neelakantan
0 siblings, 2 replies; 5+ messages in thread
From: Marius Hofert @ 2011-11-23 16:38 UTC (permalink / raw)
To: Emacs help
Hi,
When I open a new message, it has the following message head:
To:
Subject:
From: My Name <my.name@uni.edu>
Gcc: nnfolder+archive:sent.2011-11
I saw on http://www.gnu.org/software/emacs/manual/html_node/gnus/Hiding-Headers.html that I can specify which headers are visible via something like:
(setq gnus-visible-headers "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^Followup-To:\\|^Reply-To:\\|^Organization:\\|^Summary:\\|^Keywords:\\|^To:\\|^[BGF]?Cc:\\|^Posted-To:\\|^Mail-Copies-To:\\|^Mail-Followup-To:\\|^Apparently-To:\\|^Gnus-Warning:\\|^Resent-From:")
That's the default of gnus-visible-headers. However, comparing with the above, one sees that not all of these headers/entries are actually displayed… How can I specify that the following headers are always shown in a new message?
To:
Cc:
Bcc:
Subject:
From:
Date:
[I already read that with gnus-sorted-header-list one can order the entries such that they appear in the above order, so that should not be a problem]
Cheers,
Marius
PS: Most likely the last Gnus question for today :-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Gnus: How to get/force specific header entries in a new message?
2011-11-23 16:38 Gnus: How to get/force specific header entries in a new message? Marius Hofert
@ 2011-11-23 18:30 ` Tassilo Horn
2011-11-24 9:11 ` Marius Hofert
2011-11-23 18:40 ` Sivaram Neelakantan
1 sibling, 1 reply; 5+ messages in thread
From: Tassilo Horn @ 2011-11-23 18:30 UTC (permalink / raw)
To: help-gnu-emacs
Marius Hofert <marius.hofert@math.ethz.ch> writes:
Hi Marius,
> I saw on
> http://www.gnu.org/software/emacs/manual/html_node/gnus/Hiding-Headers.html
> that I can specify which headers are visible via something like:
>
> (setq gnus-visible-headers
> ...)
>
> That's the default of gnus-visible-headers. However, comparing with
> the above, one sees that not all of these headers/entries are actually
> displayed… How can I specify that the following headers are always
> shown in a new message?
`gnus-visible-headers' controls the visible headers in an article buffer
(gnus-article-mode). That's something different than the message-mode
that you have when writing new messages.
For the headers you get in message-mode, have a look at this variable
and the referenced ones.
,----[ C-h v message-generate-headers-first RET ]
| message-generate-headers-first is a variable defined in `message.el'.
| Its value is nil
|
| Documentation:
| Which headers should be generated before starting to compose a message.
| If t, generate all required headers. This can also be a list of headers to
| generate. The variables `message-required-news-headers' and
| `message-required-mail-headers' specify which headers to generate.
|
| Note that the variable `message-deletable-headers' specifies headers which
| are to be deleted and then re-generated before sending, so this variable
| will not have a visible effect for those headers.
|
| You can customize this variable.
`----
> PS: Most likely the last Gnus question for today :-)
I wouldn't bet any money on that. ;-)
Bye,
Tassilo
--
(What the world needs (I think) is not
(a Lisp (with fewer parentheses))
but (an English (with more.)))
Brian Hayes, http://tinyurl.com/3y9l2kf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Gnus: How to get/force specific header entries in a new message?
2011-11-23 16:38 Gnus: How to get/force specific header entries in a new message? Marius Hofert
2011-11-23 18:30 ` Tassilo Horn
@ 2011-11-23 18:40 ` Sivaram Neelakantan
1 sibling, 0 replies; 5+ messages in thread
From: Sivaram Neelakantan @ 2011-11-23 18:40 UTC (permalink / raw)
To: help-gnu-emacs
On Wed, Nov 23 2011,Marius Hofert wrote:
> Hi,
>
[snipped 18 lines]
Not clear whether it's a new mail message or viewing a message....
>
> To:
> Cc:
> Bcc:
> Subject:
> From:
> Date:
>
> [I already read that with gnus-sorted-header-list one can order the
> entries such that they appear in the above order, so that should not
> be a problem]
>
> Cheers,
>
> Marius
>
> PS: Most likely the last Gnus question for today :-)
>
It's this
gnus-extra-headers is a variable defined in `gnus-sum.el'.
Its value is (To Bcc)
Documentation:
*Extra headers to parse.
You can customize this variable.
This variable was introduced, or its default value was changed, in
version 24.1 of Emacs.
--------------------------------------------------------------------
OR
--------------------------------------------------------------------
message-default-headers is a variable defined in `message.el'.
Its value is ""
Documentation:
Header lines to be inserted in outgoing messages.
This can be set to a string containing or a function returning
header lines to be inserted before you edit the message, so you
can edit or delete these lines. If set to a function, it is
called and its result is inserted.
You can customize this variable.
This variable was introduced, or its default value was changed, in
version 23.2 of Emacs.
[back]
sivaram
--
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Gnus: How to get/force specific header entries in a new message?
2011-11-23 18:30 ` Tassilo Horn
@ 2011-11-24 9:11 ` Marius Hofert
2011-11-24 9:43 ` Tassilo Horn
0 siblings, 1 reply; 5+ messages in thread
From: Marius Hofert @ 2011-11-24 9:11 UTC (permalink / raw)
To: Tassilo Horn; +Cc: help-gnu-emacs
Hi Tassilo,
I played around with message-generate-headers-first, message-required-mail-headers, and message-required-mail-headers as follows:
1) (setq message-generate-headers-first t); generate all required headers
2) (setq message-required-mail-headers
'(To Cc Bcc Subject From (optional . In-Reply-To) Date Message-ID (optional . User-Agent))
message-required-headers '((optional . References)))
3) (setq gnus-sorted-header-list '("^To:" "^Cc:" "^Bcc:" "^Subject:" "^From:" "^Date:" "^Message-ID")); sort the headers
With only 2) I get
To:
Subject:
Gcc:
From:
=> Where are Cc, Bcc,…?
With 2) and 3) the same happens (well, no surprise).
With 1) and 2), I am asked for To, Cc, and Bcc and the header looks like this:
To: foo@bar.com
Subject:
Cc: foo
Bcc: bar
Date: Thu, 24 Nov 2011 09:46:51 +0100
Message-ID: <foo@uni.edu>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (darwin)
Gcc: nnfolder+archive:sent.2011-11
From: My Name <my.name@uni.edu>
Is there a way of _not_ being asked and just show empty entries (as for Subject above)? Furthermore, with 1) and 3), I'm not asked anymore, but I obtain:
To:
Subject:
Date: Thu, 24 Nov 2011 09:51:43 +0100
Message-ID: <foo@uni.edu>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (darwin)
Gcc: nnfolder+archive:sent.2011-11
From: My Name <my.name@uni.edu>
The same happens with just 1) [without 3)]. Why is the sorting not correct?
Cheers,
Marius
PS: Adjusting gnus-extra-headers [suggested by Sivaram] did not work (in the sense that it didn't change anything). As far as I understood this variable, it specifies *extra* headers, not the default ones I would like to adjust.
On 2011-11-23, at 19:30 , Tassilo Horn wrote:
> Marius Hofert writes:
>
> Hi Marius,
>
>> I saw on
>> http://www.gnu.org/software/emacs/manual/html_node/gnus/Hiding-Headers.html
>> that I can specify which headers are visible via something like:
>>
>> (setq gnus-visible-headers
>> ...)
>>
>> That's the default of gnus-visible-headers. However, comparing with
>> the above, one sees that not all of these headers/entries are actually
>> displayed… How can I specify that the following headers are always
>> shown in a new message?
>
> `gnus-visible-headers' controls the visible headers in an article buffer
> (gnus-article-mode). That's something different than the message-mode
> that you have when writing new messages.
>
> For the headers you get in message-mode, have a look at this variable
> and the referenced ones.
>
> ,----[ C-h v message-generate-headers-first RET ]
> | message-generate-headers-first is a variable defined in `message.el'.
> | Its value is nil
> |
> | Documentation:
> | Which headers should be generated before starting to compose a message.
> | If t, generate all required headers. This can also be a list of headers to
> | generate. The variables `message-required-news-headers' and
> | `message-required-mail-headers' specify which headers to generate.
> |
> | Note that the variable `message-deletable-headers' specifies headers which
> | are to be deleted and then re-generated before sending, so this variable
> | will not have a visible effect for those headers.
> |
> | You can customize this variable.
> `----
>
>> PS: Most likely the last Gnus question for today :-)
>
> I wouldn't bet any money on that. ;-)
>
> Bye,
> Tassilo
> --
> (What the world needs (I think) is not
> (a Lisp (with fewer parentheses))
> but (an English (with more.)))
> Brian Hayes, http://tinyurl.com/3y9l2kf
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Gnus: How to get/force specific header entries in a new message?
2011-11-24 9:11 ` Marius Hofert
@ 2011-11-24 9:43 ` Tassilo Horn
0 siblings, 0 replies; 5+ messages in thread
From: Tassilo Horn @ 2011-11-24 9:43 UTC (permalink / raw)
To: Marius Hofert; +Cc: help-gnu-emacs
Marius Hofert <marius.hofert@math.ethz.ch> writes:
Hi Marius,
> I played around with message-generate-headers-first,
> message-required-mail-headers, and message-required-mail-headers as
> follows:
>
> 1) (setq message-generate-headers-first t); generate all required headers
> 2) (setq message-required-mail-headers
> '(To Cc Bcc Subject From (optional . In-Reply-To) Date Message-ID (optional . User-Agent))
> message-required-headers '((optional . References)))
> 3) (setq gnus-sorted-header-list '("^To:" "^Cc:" "^Bcc:" "^Subject:" "^From:"
> "^Date:" "^Message-ID")); sort the headers
Again, `gnus-sorted-header-list' is only relevant for article buffers
(reading mail), not message-mode buffers (writing mail).
> With only 2) I get
> To:
> Subject:
> Gcc:
> From:
> => Where are Cc, Bcc,…?
> With 2) and 3) the same happens (well, no surprise).
Yeah, you didn't want to generate them beforehand.
> With 1) and 2), I am asked for To, Cc, and Bcc and the header looks like this:
>
> To: foo@bar.com
> Subject:
> Cc: foo
> Bcc: bar
> Date: Thu, 24 Nov 2011 09:46:51 +0100
> Message-ID: <foo@uni.edu>
> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (darwin)
> Gcc: nnfolder+archive:sent.2011-11
> From: My Name <my.name@uni.edu>
>
> Is there a way of _not_ being asked and just show empty entries (as
> for Subject above)?
Hm, not sure. I'd expected to be queried only for (optional . Foo)
entries, but I've never customized anything here.
BTW, why do you want Cc and Bcc to show up everytime? Do you really
need to Cc and Bcc different people in each and every mail?
Most probably, you really want to use posting styles again. That way,
you could define that when mailing from all of your uni groups, a Cc
header with value your-prof@your-uni.de will be inserted or something
along these lines.
> Furthermore, with 1) and 3), I'm not asked anymore, but I obtain:
> [...]
> The same happens with just 1) [without 3)]. Why is the sorting not correct?
The sorting *is* correct in *article* buffers, cause that's what you've
customized.
> PS: Adjusting gnus-extra-headers [suggested by Sivaram] did not work
> (in the sense that it didn't change anything). As far as I understood
> this variable, it specifies *extra* headers, not the default ones I
> would like to adjust.
Yeah, it specifies what extra variable Gnus should store in its overview
files. For example, if you'd want to display the contents of the
X-Foobar header in your summary, then you'd need that to be in
`gnus-extra-headers', because else Gnus would have to fetch any article
in order to get that header in order to display it in summary. Clearly,
that wouldn't scale if a summary contains thousands of messages.
Bye,
Tassilo
--
(What the world needs (I think) is not
(a Lisp (with fewer parentheses))
but (an English (with more.)))
Brian Hayes, http://tinyurl.com/3y9l2kf
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-11-24 9:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-23 16:38 Gnus: How to get/force specific header entries in a new message? Marius Hofert
2011-11-23 18:30 ` Tassilo Horn
2011-11-24 9:11 ` Marius Hofert
2011-11-24 9:43 ` Tassilo Horn
2011-11-23 18:40 ` Sivaram Neelakantan
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.