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

4.4 Customizing Articles

A slew of functions for customizing how the articles are to look like exist. You can call these functions interactively (see section Article Washing), or you can have them called automatically when you select the articles.

To have them called automatically, you should set the corresponding “treatment” variable. For instance, to have headers hidden, you’d set gnus-treat-hide-headers. Below is a list of variables that can be set, but first we discuss the values these variables can have.

Note: Some values, while valid, make little sense. Check the list below for sensible values.

  1. nil: Don’t do this treatment.
  2. t: Do this treatment on all body parts.
  3. head: Do the treatment on the headers.
  4. first: Do this treatment on the first body part.
  5. last: Do this treatment on the last body part.
  6. An integer: Do this treatment on all body parts that have a length less than this number.
  7. A list of strings: Do this treatment on all body parts that are in articles that are read in groups that have names that match one of the regexps in the list.
  8. A list where the first element is not a string:

    The list is evaluated recursively. The first element of the list is a predicate. The following predicates are recognized: or, and, not and typep. Here’s an example:

    (or last
        (typep "text/x-vcard"))
  9. A function: the function is called with no arguments and should return nil or non-nil. The current article is available in the buffer named by gnus-article-buffer.

You may have noticed that the word part is used here. This refers to the fact that some messages are MIME multipart articles that may be divided into several parts. Articles that are not multiparts are considered to contain just a single part.

Are the treatments applied to all sorts of multipart parts? Yes, if you want to, but by default, only ‘text/plain’ parts are given the treatment. This is controlled by the gnus-article-treat-types variable, which is a list of regular expressions that are matched to the type of the part. This variable is ignored if the value of the controlling variable is a predicate list, as described above.

The following treatment options are available. The easiest way to customize this is to examine the gnus-article-treat customization group. Values in parenthesis are suggested sensible values. Others are possible but those listed are probably sufficient for most people.

gnus-treat-buttonize (t, integer)
gnus-treat-buttonize-head (head)

See section Article Buttons.

gnus-treat-capitalize-sentences (t, integer)
gnus-treat-overstrike (t, integer)
gnus-treat-strip-cr (t, integer)
gnus-treat-strip-headers-in-body (t, integer)
gnus-treat-strip-leading-blank-lines (t, first, integer)
gnus-treat-strip-multiple-blank-lines (t, integer)
gnus-treat-strip-pem (t, last, integer)
gnus-treat-strip-trailing-blank-lines (t, last, integer)
gnus-treat-unsplit-urls (t, integer)
gnus-treat-wash-html (t, integer)

See section Article Washing.

gnus-treat-date (head)

This will transform/add date headers according to the gnus-article-date-headers variable. This is a list of Date headers to display. The formats available are:


Universal time, aka GMT, aka ZULU.


The user’s local time zone.


A semi-readable English sentence.


The time elapsed since the message was posted.


Both the original date header and a (shortened) elapsed time.


The original date header.


ISO8601 format, i.e., “2010-11-23T22:05:21”.


A format done according to the gnus-article-time-format variable.

See section Article Date.

gnus-treat-from-picon (head)
gnus-treat-mail-picon (head)
gnus-treat-newsgroups-picon (head)

See section Picons.

gnus-treat-from-gravatar (head)
gnus-treat-mail-gravatar (head)

See section Gravatars.

gnus-treat-display-smileys (t, integer)
gnus-treat-body-boundary (head)

Adds a delimiter between header and body, the string used as delimiter is controlled by gnus-body-boundary-delimiter.

See section Smileys.

gnus-treat-display-x-face (head)

See section X-Face.

gnus-treat-display-face (head)

See section Face.

gnus-treat-emphasize (t, head, integer)
gnus-treat-fill-article (t, integer)
gnus-treat-fill-long-lines (t, integer)
gnus-treat-hide-boring-headers (head)
gnus-treat-hide-citation (t, integer)
gnus-treat-hide-citation-maybe (t, integer)
gnus-treat-hide-headers (head)
gnus-treat-hide-signature (t, last)
gnus-treat-strip-banner (t, last)
gnus-treat-strip-list-identifiers (head)

See section Article Hiding.

gnus-treat-highlight-citation (t, integer)
gnus-treat-highlight-headers (head)
gnus-treat-highlight-signature (t, last, integer)

See section Article Highlighting.

gnus-treat-ansi-sequences (t)
gnus-treat-x-pgp-sig (head)
gnus-treat-unfold-headers (head)
gnus-treat-fold-headers (head)
gnus-treat-fold-newsgroups (head)
gnus-treat-leading-whitespace (head)

See section Article Header.

You can, of course, write your own functions to be called from gnus-part-display-hook. The functions are called narrowed to the part, and you can do anything you like, pretty much. There is no information that you have to keep in the buffer—you can change everything.

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

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