Gnus Manual. Node: Group Highlighting

PREVGroup Modeline Specification UPGroup Buffer Format next

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:

(face-spec-set 'my-group-face-1
               '((t (:foreground "Red" :bold t))))
(face-spec-set 'my-group-face-2
               '((t (:foreground "SeaGreen" :bold t))))
(face-spec-set 'my-group-face-3
               '((t (:foreground "SpringGreen" :bold t))))
(face-spec-set 'my-group-face-4
               '((t (:foreground "SteelBlue" :bold t))))
(face-spec-set 'my-group-face-5
               '((t (:foreground "SkyBlue" :bold t))))

(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 Faces and Fonts.

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


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. This hook calls gnus-group-highlight-line by default.

PREVGroup Modeline Specification UPGroup Buffer Format next