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

2.10 Group Parameters

The group parameters store information local to a particular group.

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 Topic Parameters). Additionally, you can set group parameters via the gnus-parameters variable, see below.

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 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. The second step is to put the following in your ‘.gnus.el

 
(setq message-subscribed-address-functions
      '(gnus-find-subscribed-addresses))

See (message)Mailing Lists section ‘Mailing Lists’ in The Message Manual, for a complete treatment of available MFT support.

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.

This parameter cannot be set via gnus-parameters. See gnus-permanently-visible-groups as an alternative.

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 gccd to the current group. If (gcc-self . none) is present, no Gcc: header will be generated, if (gcc-self . "group") is present, this string will be inserted literally as a Gcc: header. It should be a group name. The gcc-self value may also be a list of strings and t, e.g., (gcc-self "group1" "group2" t) means to gcc the newly composed message into the groups "group1" and "group2", and into the current group. The gcc-self parameter takes precedence over any default Gcc rules as described later (see section Archived Messages), with the exception for messages to resend.

Caveat: Adding (gcc-self . t) to the parameter list of nntp groups (or the like) isn’t valid. 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 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 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, and unseen.

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 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 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 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-Message-SMTP-Method" "smtp smtp.example.org 587")
  ("X-My-Header" "Funky Value")
  (signature "Funky Signature"))

If you’re using topics to organize your group buffer (see section Group Topics), note that posting styles can also be set in the topics parameters. Posting styles in topic parameters apply to all groups in this topic. More precisely, the posting-style settings for a group result from the hierarchical merging of all posting-style entries in the parameters of this group and all the topics it belongs to.

post-method

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

mail-source

If it is set, and the setting of mail-sources includes a group mail source (see section Mail Sources), the value is a mail source for this group.

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 Sieve Commands) the following Sieve code is generated:

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

To generate tests for multiple email-addresses use a group parameter like (sieve address "sender" ("name@one.org" else@two.org")). When generating a sieve script (see section Sieve Commands) Sieve code like the following is generated:

 
if address "sender" ["name@one.org", "else@two.org"] {
        fileinto "INBOX.list.sieve";
}

You can also use regexp expansions in the rules:

 
(sieve header :regex "list-id" "<c++std-\\1.accu.org>")

See see section Sieve Commands for commands and variables that might be of interest in relation to the sieve parameter.

The Sieve language is described in RFC 3028. See Emacs Sieve: (sieve)Top section ‘Top’ in Emacs Sieve.

(agent parameters)

If the agent has been enabled, you can set any of its parameters to control the behavior of the agent in individual groups. See Agent Parameters in Category Syntax. Most users will choose to set agent parameters in either an agent category or group topic to minimize the configuration effort.

(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 if and only if variable has been bound as a variable. Otherwise, only evaluating the form will take place. So, you may want to bind the variable in advance using defvar or other if the result of the form needs to be set to it.

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 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.el’ 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 want to hear a beep when you enter a group, you could put something like (dummy-variable (ding)) in the parameters of that group. If dummy-variable has been bound (see above), it will be set to the (meaningless) result of the (ding) form.

Alternatively, since the VARIABLE becomes local to the group, this pattern can be used to temporarily change a hook. For example, if the following is added to a group parameter

 
(gnus-summary-prepared-hook
  (lambda nil (local-set-key "d" (local-key-binding "n"))))

when the group is entered, the ’d’ key will not mark the article as expired.

Group parameters can be set via the gnus-parameters variable too. But some variables, such as visible, have no effect (For this case see gnus-permanently-visible-groups as an alternative.). 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))))

All clauses that matches the group name will be used, but the last setting “wins”. So if you have two clauses that both match the group name, and both set, say display, the last setting will override the first.

Parameters that are strings will be subjected to regexp substitution, as the to-group example shows.

By default, whether comparing the group name and one of those regexps specified in gnus-parameters is done in a case-sensitive manner or a case-insensitive manner depends on the value of case-fold-search at the time when the comparison is done. The value of case-fold-search is typically t; it means, for example, the element ("INBOX\\.FOO" (total-expire . t)) might be applied to both the ‘INBOX.FOO’ group and the ‘INBOX.foo’ group. If you want to make those regexps always case-sensitive, set the value of the gnus-parameters-case-fold-search variable to nil. Otherwise, set it to t if you want to compare them always in a case-insensitive manner.

You can define different sorting to different groups via gnus-parameters. Here is an example to sort an NNTP group by reverse date to see the latest news at the top and an RSS group by subject. In this example, the first group is the Debian daily news group gmane.linux.debian.user.news from news.gmane.org. The RSS group corresponds to the Debian weekly news RSS feed http://packages.debian.org/unstable/newpkg_main.en.rdf, See section RSS.

 
(setq
 gnus-parameters
 '(("nntp.*gmane\\.debian\\.user\\.news"
    (gnus-show-threads nil)
    (gnus-article-sort-functions '((not gnus-article-sort-by-date)))
    (gnus-use-adaptive-scoring nil)
    (gnus-use-scoring nil))
   ("nnrss.*debian"
    (gnus-show-threads nil)
    (gnus-article-sort-functions 'gnus-article-sort-by-subject)
    (gnus-use-adaptive-scoring nil)
    (gnus-use-scoring t)
    (gnus-score-find-score-files-function 'gnus-score-find-single)
    (gnus-summary-line-format "%U%R%z%d %I%(%[ %s %]%)\n"))))

[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated on January 25, 2015 using texi2html 1.82.