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

4. Article Buffer

The articles are displayed in the article buffer, of which there is only one. All the summary buffers share the same article buffer unless you tell Gnus otherwise.

4.1 Hiding Headers  Deciding what headers should be displayed.
4.2 Using MIME  Pushing articles through MIME before reading them.
4.3 Customizing Articles  Tailoring the look of the articles.
4.4 Article Keymap  Keystrokes available in the article buffer.
4.5 Misc Article  Other stuff.

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

4.1 Hiding Headers

The top section of each article is the head. (The rest is the body, but you may have guessed that already.)

There is a lot of useful information in the head: the name of the person who wrote the article, the date it was written and the subject of the article. That's well and nice, but there's also lots of information most people do not want to see--what systems the article has passed through before reaching you, the Message-ID, the References, etc. ad nauseam--and you'll probably want to get rid of some of those lines. If you want to keep all those lines in the article buffer, you can set gnus-show-all-headers to t.

Gnus provides you with two variables for sifting headers:

If this variable is non-nil, it should be a regular expression that says what headers you wish to keep in the article buffer. All headers that do not match this variable will be hidden.

For instance, if you only want to see the name of the person who wrote the article and the subject, you'd say:

(setq gnus-visible-headers "^From:\\|^Subject:")

This variable can also be a list of regexps to match headers to remain visible.

This variable is the reverse of gnus-visible-headers. If this variable is set (and gnus-visible-headers is nil), it should be a regular expression that matches all lines that you want to hide. All lines that do not match this variable will remain visible.

For instance, if you just want to get rid of the References line and the Xref line, you might say:

(setq gnus-ignored-headers "^References:\\|^Xref:")

This variable can also be a list of regexps to match headers to be removed.

Note that if gnus-visible-headers is non-nil, this variable will have no effect.

Gnus can also sort the headers for you. (It does this by default.) You can control the sorting by setting the gnus-sorted-header-list variable. It is a list of regular expressions that says in what order the headers are to be displayed.

For instance, if you want the name of the author of the article first, and then the subject, you might say something like:

(setq gnus-sorted-header-list '("^From:" "^Subject:"))

Any headers that are to remain visible, but are not listed in this variable, will be displayed in random order after all the headers listed in this variable.

You can hide further boring headers by setting gnus-treat-hide-boring-headers to head. What this function does depends on the gnus-boring-article-headers variable. It's a list, but this list doesn't actually contain header names. Instead it lists various boring conditions that Gnus can check and remove from sight.

These conditions are:

Remove all empty headers.
Remove the Followup-To header if it is identical to the Newsgroups header.
Remove the Reply-To header if it lists the same addresses as the From header, or if the broken-reply-to group parameter is set.
Remove the Newsgroups header if it only contains the current group name.
Remove the To header if it only contains the address identical to the current group's to-address parameter.
Remove the To header if it only contains the address identical to the current group's to-list parameter.
Remove the CC header if it only contains the address identical to the current group's to-list parameter.
Remove the Date header if the article is less than three days old.
Remove the To header if it is very long.
Remove all To headers if there are more than one.

To include these three elements, you could say something like:

(setq gnus-boring-article-headers
      '(empty followup-to reply-to))

This is also the default value for this variable.

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

4.2 Using MIME

Mime is a standard for waving your hands through the air, aimlessly, while people stand around yawning.

MIME, however, is a standard for encoding your articles, aimlessly, while all newsreaders die of fear.

MIME may specify what character set the article uses, the encoding of the characters, and it also makes it possible to embed pictures and other naughty stuff in innocent-looking articles.

Gnus pushes MIME articles through gnus-display-mime-function to display the MIME parts. This is gnus-display-mime by default, which creates a bundle of clickable buttons that can be used to display, save and manipulate the MIME objects.

The following commands are available when you have placed point over a MIME button:

RET (Article)
BUTTON-2 (Article)
Toggle displaying of the MIME object (gnus-article-press-button). If built-in viewers can not display the object, Gnus resorts to external viewers in the `mailcap' files. If a viewer has the `copiousoutput' specification, the object is displayed inline.

M-RET (Article)
v (Article)
Prompt for a method, and then view the MIME object using this method (gnus-mime-view-part).

t (Article)
View the MIME object as if it were a different MIME media type (gnus-mime-view-part-as-type).

C (Article)
Prompt for a charset, and then view the MIME object using this charset (gnus-mime-view-part-as-charset).

o (Article)
Prompt for a file name, and then save the MIME object (gnus-mime-save-part).

C-o (Article)
Prompt for a file name, then save the MIME object and strip it from the article. Then proceed to article editing, where a reasonable suggestion is being made on how the altered article should look like. The stripped MIME object will be referred via the message/external-body MIME type. (gnus-mime-save-part-and-strip).

d (Article)
Delete the MIME object from the article and replace it with some information about the removed MIME object (gnus-mime-delete-part).

c (Article)
Copy the MIME object to a fresh buffer and display this buffer (gnus-mime-copy-part). Compressed files like `.gz' and `.bz2' are automatically decompressed if auto-compression-mode is enabled (see section `Accessing Compressed Files' in The Emacs Editor).

p (Article)
Print the MIME object (gnus-mime-print-part). This command respects the `print=' specifications in the `.mailcap' file.

i (Article)
Insert the contents of the MIME object into the buffer (gnus-mime-inline-part) as text/plain. If given a prefix, insert the raw contents without decoding. If given a numerical prefix, you can do semi-manual charset stuff (see gnus-summary-show-article-charset-alist in 3.4 Scrolling the Article).

E (Article)
View the MIME object with an internal viewer. If no internal viewer is available, use an external viewer (gnus-mime-view-part-internally).

e (Article)
View the MIME object with an external viewer. (gnus-mime-view-part-externally).

| (Article)
Output the MIME object to a process (gnus-mime-pipe-part).

. (Article)
Interactively run an action on the MIME object (gnus-mime-action-on-part).

Gnus will display some MIME objects automatically. The way Gnus determines which parts to do this with is described in the Emacs MIME manual.

It might be best to just use the toggling functions from the article buffer to avoid getting nasty surprises. (For instance, you enter the group `alt.sing-a-long' and, before you know it, MIME has decoded the sound file in the article and some horrible sing-a-long song comes screaming out your speakers, and you can't find the volume button, because there isn't one, and people are starting to look at you, and you try to stop the program, but you can't, and you can't find the program to control the volume, and everybody else in the room suddenly decides to look at you disdainfully, and you'll feel rather stupid.)

Any similarity to real events and people is purely coincidental. Ahem.

Also see section 3.18 MIME Commands.

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

4.3 Customizing Articles

A slew of functions for customizing how the articles are to look like exist. You can call these functions interactively (see section 3.17.4 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. last: Do this treatment on the last part.

  5. An integer: Do this treatment on all body parts that have a length less than this number.

  6. 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.

  7. 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"))

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 3.17.6 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, 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 3.17.4 Article Washing.

gnus-treat-date-english (head)
gnus-treat-date-iso8601 (head)
gnus-treat-date-lapsed (head)
gnus-treat-date-local (head)
gnus-treat-date-original (head)
gnus-treat-date-user-defined (head)
gnus-treat-date-ut (head)

See section 3.17.8 Article Date.

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

See section 8.17.4 Picons.

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 8.17.3 Smileys.

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

See section 8.17.1 X-Face.

gnus-treat-display-face (head)

See section 8.17.2 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 3.17.3 Article Hiding.

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

See section 3.17.1 Article Highlighting.

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 3.17.5 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 ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.4 Article Keymap

Most of the keystrokes in the summary buffer can also be used in the article buffer. They should behave as if you typed them in the summary buffer, which means that you don't actually have to have a summary buffer displayed while reading. You can do it all from the article buffer.

The key v is reserved for users. You can bind it key to some function or better use it as a prefix key.

A few additional keystrokes are available:

Scroll forwards one page (gnus-article-next-page). This is exactly the same as h SPACE h.

Scroll backwards one page (gnus-article-prev-page). This is exactly the same as h DEL h.

C-c ^
If point is in the neighborhood of a Message-ID and you press C-c ^, Gnus will try to get that article from the server (gnus-article-refer-article).

C-c C-m
Send a reply to the address near point (gnus-article-mail). If given a prefix, include the mail.

Reconfigure the buffers so that the summary buffer becomes visible (gnus-article-show-summary).

Give a very brief description of the available keystrokes (gnus-article-describe-briefly).

Go to the next button, if any (gnus-article-next-button). This only makes sense if you have buttonizing turned on.

Go to the previous button, if any (gnus-article-prev-button).

Send a reply to the current article and yank the current article (gnus-article-reply-with-original). If given a prefix, make a wide reply. If the region is active, only yank the text in the region.

Send a followup to the current article and yank the current article (gnus-article-followup-with-original). If given a prefix, make a wide reply. If the region is active, only yank the text in the region.

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

4.5 Misc Article

If non-nil, use the same article buffer for all the groups. (This is the default.) If nil, each group will have its own article buffer.

Hook used to decode MIME articles. The default value is (article-decode-charset article-decode-encoded-words)

This hook is called right after the article has been inserted into the article buffer. It is mainly intended for functions that do something depending on the contents; it should probably not be used for changing the contents of the article buffer.

Hook called in article mode buffers.

Syntax table used in article buffers. It is initialized from text-mode-syntax-table.

If non-nil, allow scrolling the article buffer even when there no more new text to scroll in. The default is nil.

This variable is a format string along the same lines as gnus-summary-mode-line-format (see section 3.1.3 Summary Buffer Mode Line). It accepts the same format specifications as that variable, with two extensions:

The wash status of the article. This is a short string with one character for each possible article wash operation that may have been performed. The characters and their meaning:

Displayed when cited text may be hidden in the article buffer.

Displayed when headers are hidden in the article buffer.

Displayed when article is digitally signed or encrypted, and Gnus has hidden the security headers. (N.B. does not tell anything about security status, i.e. good or bad signature.)

Displayed when the signature has been hidden in the Article buffer.

Displayed when Gnus has treated overstrike characters in the article buffer.

Displayed when Gnus has treated emphasised strings in the article buffer.

The number of MIME parts in the article.

Controls whether page breaking is to take place. If this variable is non-nil, the articles will be divided into pages whenever a page delimiter appears in the article. If this variable is nil, paging will not be done.

This is the delimiter mentioned above. By default, it is `^L' (formfeed).

This variable controls whether Gnus performs IDNA decoding of internationalized domain names inside `From', `To' and `Cc' headers. This requires GNU Libidn, and this variable is only enabled if you have installed it.

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

This document was generated by XEmacs Webmaster on October, 2 2007 using texi2html