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

2.1 Group Buffer Format

You can customize the Group Mode tool bar, see M-x customize-apropos RET gnus-group-tool-bar. This feature is only available in Emacs.

The tool bar icons are now (de)activated correctly depending on the cursor position. Therefore, moving around in the Group Buffer is slower. You can disable this via the variable gnus-group-update-tool-bar. Its default value depends on your Emacs version.


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

2.1.1 Group Line Specification

The default format of the group buffer is nice and dull, but you can make it as exciting and ugly as you feel like.

Here’s a couple of example group lines:

 
     25: news.announce.newusers
 *    0: alt.fan.andrea-dworkin

Quite simple, huh?

You can see that there are 25 unread articles in ‘news.announce.newusers’. There are no unread articles, but some ticked articles, in ‘alt.fan.andrea-dworkin’ (see that little asterisk at the beginning of the line?).

You can change that format to whatever you want by fiddling with the gnus-group-line-format variable. This variable works along the lines of a format specification, which is pretty much the same as a printf specifications, for those of you who use (feh!) C. See section Formatting Variables.

%M%S%5y:%B%(%g%)\n’ is the value that produced those lines above.

There should always be a colon on the line; the cursor always moves to the colon after performing an operation. See section Positioning Point. Nothing else is required—not even the group name. All displayed text is just window dressing, and is never examined by Gnus. Gnus stores all real information it needs using text properties.

(Note that if you make a really strange, wonderful, spreadsheet-like layout, everybody will believe you are hard at work with the accounting instead of wasting time reading news.)

Here’s a list of all available format characters:

M

An asterisk if the group only has marked articles.

S

Whether the group is subscribed.

L

Level of subscribedness.

N

Number of unread articles.

I

Number of dormant articles.

T

Number of ticked articles.

R

Number of read articles.

U

Number of unseen articles.

t

Estimated total number of articles. (This is really max-number minus min-number plus 1.)

Gnus uses this estimation because the NNTP protocol provides efficient access to max-number and min-number but getting the true unread message count is not possible efficiently. For hysterical raisins, even the mail back ends, where the true number of unread messages might be available efficiently, use the same limited interface. To remove this restriction from Gnus means that the back end interface has to be changed, which is not an easy job.

The nnml backend (see section Mail Spool) has a feature called “group compaction” which circumvents this deficiency: the idea is to renumber all articles from 1, removing all gaps between numbers, hence getting a correct total count. Other backends may support this in the future. In order to keep your total article count relatively up to date, you might want to compact your groups (or even directly your server) from time to time. See section Misc Group Stuff, See section Server Commands.

y

Number of unread, unticked, non-dormant articles.

i

Number of ticked and dormant articles.

g

Full group name.

G

Group name.

C

Group comment (see section Group Parameters) or group name if there is no comment element in the group parameters.

D

Newsgroup description. You need to read the group descriptions before these will appear, and to do that, you either have to set gnus-read-active-file or use the group buffer M-d command.

o

m’ if moderated.

O

(m)’ if moderated.

s

Select method.

B

If the summary buffer for the group is open or not.

n

Select from where.

z

A string that looks like ‘<%s:%n>’ if a foreign select method is used.

P

Indentation based on the level of the topic (see section Group Topics).

c

Short (collapsed) group name. The gnus-group-uncollapsed-levels variable says how many levels to leave at the end of the group name. The default is 1—this will mean that group names like ‘gnu.emacs.gnus’ will be shortened to ‘g.e.gnus’.

m

%’ (gnus-new-mail-mark) if there has arrived new mail to the group lately.

p

#’ (gnus-process-mark) if the group is process marked.

d

A string that says when you last read the group (see section Group Timestamp).

F

The disk space used by the articles fetched by both the cache and agent. The value is automatically scaled to bytes(B), kilobytes(K), megabytes(M), or gigabytes(G) to minimize the column width. A format of %7F is sufficient for a fixed-width column.

u

User defined specifier. The next character in the format string should be a letter. Gnus will call the function gnus-user-format-function-X’, where ‘X’ is the letter following ‘%u’. The function will be passed a single dummy parameter as argument. The function should return a string, which will be inserted into the buffer just like information from any other specifier.

All the “number-of” specs will be filled with an asterisk (‘*’) if no info is available—for instance, if it is a non-activated foreign group, or a bogus native group.


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

2.1.2 Group Mode Line Specification

The mode line can be changed by setting gnus-group-mode-line-format (see section Mode Line Formatting). It doesn’t understand that many format specifiers:

S

The native news server.

M

The native select method.


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

2.1.3 Group Highlighting

Highlighting in the group buffer is controlled by the gnus-group-highlight variable. This is an alist with elements that look like (form . face). If form evaluates to something non-nil, the face will be used on the line.

Here’s an example value for this variable that might look nice if the background is dark:

 
(cond (window-system
       (setq custom-background-mode 'light)
       (defface my-group-face-1
         '((t (:foreground "Red" :bold t))) "First group face")
       (defface my-group-face-2
         '((t (:foreground "DarkSeaGreen4" :bold t)))
         "Second group face")
       (defface my-group-face-3
         '((t (:foreground "Green4" :bold t))) "Third group face")
       (defface my-group-face-4
         '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
       (defface my-group-face-5
         '((t (:foreground "Blue" :bold t))) "Fifth group face")))

(setq gnus-group-highlight
      '(((> unread 200) . my-group-face-1)
        ((and (< level 3) (zerop unread)) . my-group-face-2)
        ((< level 3) . my-group-face-3)
        ((zerop unread) . my-group-face-4)
        (t . my-group-face-5)))

Also see section Faces and Fonts.

Variables that are dynamically bound when the forms are evaluated include:

group

The group name.

unread

The number of unread articles in the group.

method

The select method.

mailp

Whether the group is a mail group.

level

The level of the group.

score

The score of the group.

ticked

The number of ticked articles in the group.

total

The total number of articles in the group. Or rather, max-number minus min-number plus one.

topic

When using the topic minor mode, this variable is bound to the current topic being inserted.

When the forms are evaled, point is at the beginning of the line of the group in question, so you can use many of the normal Gnus functions for snarfing info on the group.

gnus-group-update-hook is called when a group line is changed. It will not be called when gnus-visual is nil.


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

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