3.16.2 Topic Variables

The previous section told you how to tell Gnus which topics to display. This section explains how to tell Gnus what to display about each topic.

The topic lines themselves are created according to the gnus-topic-line-format variable (see Formatting Variables). Valid elements are:

i

Indentation.

n

Topic name.

v

Visibility.

l

Level.

g

Number of groups in the topic.

G

Number of groups in the topic and all its subtopics.

a

Number of unread articles in the topic.

A

Number of unread articles in the topic and all its subtopics.

Each sub-topic (and the groups in the sub-topics) will be indented with gnus-topic-indent-level times the topic level number of spaces. The default is 2.

gnus-topic-mode-hook is called in topic minor mode buffers.

The gnus-topic-display-empty-topics says whether to display even topics that have no unread articles in them. The default is t.

If gnus-topic-display-predicate is non-nil, it should be a function that says whether the topic is to be displayed or not. The function will be called with one parameter (the name of the topic) and should return non-nil is the topic is to be displayed.

For instance, if you don’t even want to be reminded that work exists outside of office hours, you can gather all the work-related groups into a topic called ‘"Work"’, and then say something like the following:

(setq gnus-topic-display-predicate
      (lambda (name)
        (or (not (equal name "Work"))
            (< 090000
               (string-to-number (format-time-string "%H%M%S"))
               170000))))