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

3.25 Tree Display

If you don’t like the normal Gnus summary display, you might try setting gnus-use-trees to t. This will create (by default) an additional tree buffer. You can execute all summary mode commands in the tree buffer.

There are a few variables to customize the tree display, of course:

gnus-tree-mode-hook

A hook called in all tree mode buffers.

gnus-tree-mode-line-format

A format string for the mode bar in the tree mode buffers (see section Mode Line Formatting). The default is ‘Gnus: %%b %S %Z’. For a list of valid specs, see section Summary Buffer Mode Line.

gnus-selected-tree-face

Face used for highlighting the selected article in the tree buffer. The default is modeline.

gnus-tree-line-format

A format string for the tree nodes. The name is a bit of a misnomer, though—it doesn’t define a line, but just the node. The default value is ‘%(%[%3,3n%]%)’, which displays the first three characters of the name of the poster. It is vital that all nodes are of the same length, so you must use ‘%4,4n’-like specifiers.

Valid specs are:

n

The name of the poster.

f

The From header.

N

The number of the article.

[

The opening bracket.

]

The closing bracket.

s

The subject.

See section Formatting Variables.

Variables related to the display are:

gnus-tree-brackets

This is used for differentiating between “real” articles and “sparse” articles. The format is

 
((real-open . real-close)
 (sparse-open . sparse-close)
 (dummy-open . dummy-close))

and the default is ((?[ . ?]) (?( . ?)) (?{ . ?}) (?< . ?>)).

gnus-tree-parent-child-edges

This is a list that contains the characters used for connecting parent nodes to their children. The default is (?- ?\\ ?|).

gnus-tree-minimize-window

If this variable is non-nil, Gnus will try to keep the tree buffer as small as possible to allow more room for the other Gnus windows. If this variable is a number, the tree buffer will never be higher than that number. The default is t. Note that if you have several windows displayed side-by-side in a frame and the tree buffer is one of these, minimizing the tree window will also resize all other windows displayed next to it.

You may also wish to add the following hook to keep the window minimized at all times:

 
(add-hook 'gnus-configure-windows-hook
          'gnus-tree-perhaps-minimize)
gnus-generate-tree-function

The function that actually generates the thread tree. Two predefined functions are available: gnus-generate-horizontal-tree and gnus-generate-vertical-tree (which is the default).

Here’s an example from a horizontal tree buffer:

 
{***}-(***)-[odd]-[Gun]
     |      \[Jan]
     |      \[odd]-[Eri]
     |      \(***)-[Eri]
     |            \[odd]-[Paa]
     \[Bjo]
     \[Gun]
     \[Gun]-[Jor]

Here’s the same thread displayed in a vertical tree buffer:

 
{***}
  |--------------------------\-----\-----\
(***)                         [Bjo] [Gun] [Gun]
  |--\-----\-----\                          |
[odd] [Jan] [odd] (***)                   [Jor]
  |           |     |--\
[Gun]       [Eri] [Eri] [odd]
                          |
                        [Paa]

If you’re using horizontal trees, it might be nice to display the trees side-by-side with the summary buffer. You could add something like the following to your ‘~/.gnus.el’ file:

 
(setq gnus-use-trees t
      gnus-generate-tree-function 'gnus-generate-horizontal-tree
      gnus-tree-minimize-window nil)
(gnus-add-configuration
 '(article
   (vertical 1.0
             (horizontal 0.25
                         (summary 0.75 point)
                         (tree 1.0))
             (article 1.0))))

See section Window Layout.


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

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