[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.10 Group Parameters

The group parameters store information local to a particular group. Here's an example group parameter list:

 
((to-address . "ding@gnus.org")
 (auto-expire . t))

We see that each element consists of a "dotted pair"---the thing before the dot is the key, while the thing after the dot is the value. All the parameters have this form except local variable specs, which are not dotted pairs, but proper lists.

Some parameters have correspondent customizable variables, each of which is an alist of regexps and values.

The following group parameters can be used:

to-address
Address used by when doing followups and new posts.

 
(to-address . "some@where.com")

This is primarily useful in mail groups that represent closed mailing lists--mailing lists where it's expected that everybody that writes to the mailing list is subscribed to it. Since using this parameter ensures that the mail only goes to the mailing list itself, it means that members won't receive two copies of your followups.

Using to-address will actually work whether the group is foreign or not. Let's say there's a group on the server that is called `fa.4ad-l'. This is a real newsgroup, but the server has gotten the articles from a mail-to-news gateway. Posting directly to this group is therefore impossible--you have to send mail to the mailing list address instead.

See also gnus-parameter-to-address-alist.

to-list
Address used when doing a in that group.

 
(to-list . "some@where.com")

It is totally ignored when doing a followup--except that if it is present in a news group, you'll get mail group semantics when doing f.

If you do an a command in a mail group and you have neither a to-list group parameter nor a to-address group parameter, then a to-list group parameter will be added automatically upon sending the message if gnus-add-to-list is set to t.

If you do an a command in a mail group and you don't have a to-list group parameter, one will be added automatically upon sending the message.

If this variable is set, gnus-mailing-list-mode is turned on when entering summary buffer.

See also gnus-parameter-to-list-alist.

subscribed
If this parameter is set to t, Gnus will consider the to-address and to-list parameters for this group as addresses of mailing lists you are subscribed to. Giving Gnus this information is (only) a first step in getting it to generate correct Mail-Followup-To headers for your posts to these lists. See section `Mailing Lists' in The Message Manual, for a complete treatment of available MFT support.

See also gnus-find-subscribed-addresses, the function that directly uses this group parameter.

visible
If the group parameter list has the element (visible . t), that group will always be visible in the Group buffer, regardless of whether it has any unread articles.

broken-reply-to
Elements like (broken-reply-to . t) signals that Reply-To headers in this group are to be ignored, and for the header to be hidden if reply-to is part of gnus-boring-article-headers. This can be useful if you're reading a mailing list group where the listserv has inserted Reply-To headers that point back to the listserv itself. That is broken behavior. So there!

to-group
Elements like (to-group . "some.group.name") means that all posts in that group will be sent to some.group.name.

newsgroup
If you have (newsgroup . t) in the group parameter list, Gnus will treat all responses as if they were responses to news articles. This can be useful if you have a mail group that's really a mirror of a news group.

gcc-self
If (gcc-self . t) is present in the group parameter list, newly composed messages will be Gcc'd to the current group. If (gcc-self . none) is present, no Gcc: header will be generated, if (gcc-self . "string") is present, this string will be inserted literally as a gcc header. This parameter takes precedence over any default Gcc rules as described later (see section 5.4 Archived Messages).

Caveat: It yields an error putting (gcc-self . t) in groups of an nntp server or so, because an nntp server doesn't accept articles.

auto-expire
If the group parameter has an element that looks like (auto-expire . t), all articles read will be marked as expirable. For an alternative approach, see section 6.3.9 Expiring Mail.

See also gnus-auto-expirable-newsgroups.

total-expire
If the group parameter has an element that looks like (total-expire . t), all read articles will be put through the expiry process, even if they are not marked as expirable. Use with caution. Unread, ticked and dormant articles are not eligible for expiry.

See also gnus-total-expirable-newsgroups.

expiry-wait
If the group parameter has an element that looks like (expiry-wait . 10), this value will override any nnmail-expiry-wait and nnmail-expiry-wait-function (see section 6.3.9 Expiring Mail) when expiring expirable messages. The value can either be a number of days (not necessarily an integer) or the symbols never or immediate.

expiry-target
Where expired messages end up. This parameter overrides nnmail-expiry-target.

score-file
Elements that look like (score-file . "file") will make `file' into the current score file for the group in question. All interactive score entries will be put into this file.

adapt-file
Elements that look like (adapt-file . "file") will make `file' into the current adaptive file for the group in question. All adaptive score entries will be put into this file.

admin-address
When unsubscribing from a mailing list you should never send the unsubscription notice to the mailing list itself. Instead, you'd send messages to the administrative address. This parameter allows you to put the admin address somewhere convenient.

display
Elements that look like (display . MODE) say which articles to display on entering the group. Valid values are:

all
Display all articles, both read and unread.

an integer
Display the last integer articles in the group. This is the same as entering the group with C-u integer.

default
Display the default visible articles, which normally includes unread and ticked articles.

an array
Display articles that satisfy a predicate.

Here are some examples:

[unread]
Display only unread articles.

[not expire]
Display everything except expirable articles.

[and (not reply) (not expire)]
Display everything except expirable and articles you've already responded to.

The available operators are not, and and or. Predicates include tick, unsend, undownload, unread, dormant, expire, reply, killed, bookmark, score, save, cache, forward, unseen and recent.

The display parameter works by limiting the summary buffer to the subset specified. You can pop the limit by using the / w command (see section 3.8 Limiting).

comment
Elements that look like (comment . "This is a comment") are arbitrary comments on the group. You can display comments in the group line (see section 2.1.1 Group Line Specification).

charset
Elements that look like (charset . iso-8859-1) will make iso-8859-1 the default charset; that is, the charset that will be used for all articles that do not specify a charset.

See also gnus-group-charset-alist.

ignored-charsets
Elements that look like (ignored-charsets x-unknown iso-8859-1) will make iso-8859-1 and x-unknown ignored; that is, the default charset will be used for decoding articles.

See also gnus-group-ignored-charsets-alist.

posting-style
You can store additional posting style information for this group here (see section 5.5 Posting Styles). The format is that of an entry in the gnus-posting-styles alist, except that there's no regexp matching the group name (of course). Style elements in this group parameter will take precedence over the ones found in gnus-posting-styles.

For instance, if you want a funky name and signature in this group only, instead of hacking gnus-posting-styles, you could put something like this in the group parameters:

 
(posting-style
  (name "Funky Name")
  ("X-My-Header" "Funky Value")
  (signature "Funky Signature"))

post-method
If it is set, the value is used as the method for posting message instead of gnus-post-method.

banner
An item like (banner . regexp) causes any part of an article that matches the regular expression regexp to be stripped. Instead of regexp, you can also use the symbol signature which strips the last signature or any of the elements of the alist gnus-article-banner-alist.

sieve
This parameter contains a Sieve test that should match incoming mail that should be placed in this group. From this group parameter, a Sieve `IF' control structure is generated, having the test as the condition and `fileinto "group.name";' as the body.

For example, if the `INBOX.list.sieve' group has the (sieve address "sender" "sieve-admin@extundo.com") group parameter, when translating the group parameter into a Sieve script (see section 2.17.5 Sieve Commands) the following Sieve code is generated:

 
if address \"sender\" \"sieve-admin@extundo.com\" {
        fileinto \"INBOX.list.sieve\";
}

The Sieve language is described in RFC 3028. See section `Top' in Emacs Sieve.

(variable form)
You can use the group parameters to set variables local to the group you are entering. If you want to turn threading off in `news.answers', you could put (gnus-show-threads nil) in the group parameters of that group. gnus-show-threads will be made into a local variable in the summary buffer you enter, and the form nil will be evaled there.

Note that this feature sets the variable locally to the summary buffer. But some variables are evaluated in the article buffer, or in the message buffer (of a reply or followup or otherwise newly created message). As a workaround, it might help to add the variable in question to gnus-newsgroup-variables. See section 3.26 Various Summary Stuff. So if you want to set message-from-style via the group parameters, then you may need the following statement elsewhere in your `~/.gnus' file:

 
(add-to-list 'gnus-newsgroup-variables 'message-from-style)

A use for this feature is to remove a mailing list identifier tag in the subject fields of articles. E.g. if the news group

 
nntp+news.gnus.org:gmane.text.docbook.apps

has the tag `DOC-BOOK-APPS:' in the subject of all articles, this tag can be removed from the article subjects in the summary buffer for the group by putting (gnus-list-identifiers "DOCBOOK-APPS:") into the group parameters for the group.

This can also be used as a group-specific hook function, if you'd like. If you want to hear a beep when you enter a group, you could put something like (dummy-variable (ding)) in the parameters of that group. dummy-variable will be set to the result of the (ding) form, but who cares?

Use the G p or the G c command to edit group parameters of a group. (G p presents you with a Lisp-based interface, G c presents you with a Customize-like interface. The latter helps avoid silly Lisp errors.) You might also be interested in reading about topic parameters (see section 2.16.5 Topic Parameters).

Group parameters can be set via the gnus-parameters variable too. But some variables, such as visible, have no effect. For example:

 
(setq gnus-parameters
      '(("mail\\..*"
         (gnus-show-threads nil)
         (gnus-use-scoring nil)
         (gnus-summary-line-format
          "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
         (gcc-self . t)
         (display . all))

        ("^nnimap:\\(foo.bar\\)$"
         (to-group . "\\1"))

        ("mail\\.me"
         (gnus-use-scoring  t))

        ("list\\..*"
         (total-expire . t)
         (broken-reply-to . t))))

String value of parameters will be subjected to regexp substitution, as the to-group example shows.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on October, 20 2003 using texi2html