A slew of functions for customizing how the articles are to look like exist. You can call these functions interactively (see 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.
nil
: Don’t do this treatment.
t
: Do this treatment on all body parts.
head
: Do the treatment on the headers.
first
: Do this treatment on the first body part.
last
: Do this treatment on the last body part.
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"))
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 Article Buttons.
gnus-treat-capitalize-sentences (t, integer)
gnus-treat-overstrike (t, integer)
gnus-treat-strip-cr (t, integer)
gnus-treat-emojize-symbols (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 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:
ut
Universal time, aka GMT, aka ZULU.
local
The user’s local time zone.
english
A semi-readable English sentence.
lapsed
The time elapsed since the message was posted.
combined-lapsed
Both the original date header and a (shortened) elapsed time.
combined-local-lapsed
Both the time in the user’s local time zone a (shortened) elapsed time.
original
The original date header.
iso8601
ISO8601 format, i.e., “2010-11-23T22:05:21”.
user-defined
A format done according to the gnus-article-time-format
variable.
See Article Date.
gnus-treat-from-picon (head)
gnus-treat-mail-picon (head)
gnus-treat-newsgroups-picon (head)
See Picons.
gnus-treat-from-gravatar (head)
gnus-treat-mail-gravatar (head)
See 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 Smileys.
gnus-treat-display-x-face (head)
See X-Face.
gnus-treat-display-face (head)
See 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-strip-banner (t, last)
¶gnus-treat-strip-list-identifiers (head)
See Article Hiding.
gnus-treat-highlight-citation (t, integer)
¶gnus-treat-highlight-headers (head)
¶gnus-treat-highlight-signature (t, last, integer)
See 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 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.