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

3.18 Article Treatment

Reading through this huge manual, you may have quite forgotten that the object of newsreaders is to actually, like, read what people have written. Reading articles. Unfortunately, people are quite bad at writing, so there are tons of functions and variables to make reading these articles easier.

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

3.18.1 Article Highlighting

Not only do you want your article buffer to look like fruit salad, but you want it to look like technicolor fruit salad.

W H a

Do much highlighting of the current article (gnus-article-highlight). This function highlights header, cited text, the signature, and adds buttons to the body and the head.

W H h

Highlight the headers (gnus-article-highlight-headers). The highlighting will be done according to the gnus-header-face-alist variable, which is a list where each element has the form (regexp name content). regexp is a regular expression for matching the header, name is the face used for highlighting the header name (see section Faces and Fonts) and content is the face for highlighting the header value. The first match made will be used. Note that regexp shouldn’t have ‘^’ prepended—Gnus will add one.

W H c

Highlight cited text (gnus-article-highlight-citation).

Some variables to customize the citation highlights:


If the article size in bytes is bigger than this variable (which is 25000 by default), no citation highlighting will be performed.


Maximum possible length for a citation prefix (default 20).


List of faces used for highlighting citations (see section Faces and Fonts). When there are citations from multiple articles in the same message, Gnus will try to give each citation from each article its own face. This should make it easier to see who wrote what.


Regexp matching normal Supercite attribution lines.


Regexp matching mangled Supercite attribution lines.


Minimum number of identical prefixes we have to see before we believe that it’s a citation.


Regexp matching the beginning of an attribution line.


Regexp matching the end of an attribution line.


Face used for attribution lines. It is merged with the face for the cited text belonging to the attribution.


If non-nil, no citation highlighting will be performed on lines beginning with ‘>From ’. Those lines may have been quoted by MTAs in order not to mix up with the envelope From line. The default value is t.

W H s

Highlight the signature (gnus-article-highlight-signature). Everything after gnus-signature-separator (see section Article Signature) in an article will be considered a signature and will be highlighted with gnus-signature-face, which is italic by default.

See section Customizing Articles, for how to highlight articles automatically.

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

3.18.2 Article Fontisizing

People commonly add emphasis to words in news articles by writing things like ‘_this_’ or ‘*this*’ or ‘/this/’. Gnus can make this look nicer by running the article through the W e (gnus-article-emphasize) command.

How the emphasis is computed is controlled by the gnus-emphasis-alist variable. This is an alist where the first element is a regular expression to be matched. The second is a number that says what regular expression grouping is used to find the entire emphasized word. The third is a number that says what regexp grouping should be displayed and highlighted. (The text between these two groupings will be hidden.) The fourth is the face used for highlighting.

(setq gnus-emphasis-alist
      '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
        ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))

By default, there are seven rules, and they use the following faces: gnus-emphasis-bold, gnus-emphasis-italic, gnus-emphasis-underline, gnus-emphasis-bold-italic, gnus-emphasis-underline-italic, gnus-emphasis-underline-bold, and gnus-emphasis-underline-bold-italic.

If you want to change these faces, you can either use M-x customize, or you can use copy-face. For instance, if you want to make gnus-emphasis-italic use a red face instead, you could say something like:

(copy-face 'red 'gnus-emphasis-italic)

If you want to highlight arbitrary words, you can use the gnus-group-highlight-words-alist variable, which uses the same syntax as gnus-emphasis-alist. The highlight-words group parameter (see section Group Parameters) can also be used.

See section Customizing Articles, for how to fontize articles automatically.

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

3.18.3 Article Hiding

Or rather, hiding certain things in each article. There usually is much too much cruft in most articles.

W W a

Do quite a lot of hiding on the article buffer (gnus-article-hide). In particular, this function will hide headers, PGP, cited text and the signature.

W W h

Hide headers (gnus-article-hide-headers). See section Hiding Headers.

W W b

Hide headers that aren’t particularly interesting (gnus-article-hide-boring-headers). See section Hiding Headers.

W W s

Hide signature (gnus-article-hide-signature). See section Article Signature.

W W l

Strip list identifiers specified in gnus-list-identifiers. These are strings some mailing list servers add to the beginning of all Subject headers—for example, ‘[zebra 4711]’. Any leading ‘Re: ’ is skipped before stripping. gnus-list-identifiers may not contain \\(..\\).


A regular expression that matches list identifiers to be removed from subject. This can also be a list of regular expressions.


Hide PEM (privacy enhanced messages) cruft (gnus-article-hide-pem).


Strip the banner specified by the banner group parameter (gnus-article-strip-banner). This is mainly used to hide those annoying banners and/or signatures that some mailing lists and moderated groups adds to all the messages. The way to use this function is to add the banner group parameter (see section Group Parameters) to the group you want banners stripped from. The parameter either be a string, which will be interpreted as a regular expression matching text to be removed, or the symbol signature, meaning that the (last) signature should be removed, or other symbol, meaning that the corresponding regular expression in gnus-article-banner-alist is used.

For instance:

(setq gnus-article-banner-alist
      ((googleGroups .

Regardless of a group, you can hide things like advertisements only when the sender of an article has a certain mail address specified in gnus-article-address-banner-alist.


Alist of mail addresses and banners. Each element has the form (address . banner), where address is a regexp matching a mail address in the From header, banner is one of a symbol signature, an item in gnus-article-banner-alist, a regexp and nil. If address matches author’s mail address, it will remove things like advertisements. For example, if a sender has the mail address ‘hail@yoo-hoo.co.jp’ and there is a banner something like ‘Do You Yoo-hoo!?’ in all articles he sends, you can use the following element to remove them:

("@yoo-hoo\\.co\\.jp\\'" .
 "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
W W c

Hide citation (gnus-article-hide-citation). Some variables for customizing the hiding:


Gnus adds buttons to show where the cited text has been hidden, and to allow toggle hiding the text. The format of the variable is specified by these format-like variable (see section Formatting Variables). These specs are valid:


Starting point of the hidden text.


Ending point of the hidden text.


Number of characters in the hidden region.


Number of lines of hidden text.


The number of lines at the beginning of the cited text to leave shown. This can also be a cons cell with the number of lines at the top and bottom of the text, respectively, to remain visible.

W W C-c

Hide citation (gnus-article-hide-citation-maybe) depending on the following two variables:


If the cited text is of a bigger percentage than this variable (default 50), hide the cited text.


The cited text must have at least this length (default 10) before it is hidden.


Hide cited text in articles that aren’t roots (gnus-article-hide-citation-in-followups). This isn’t very useful as an interactive command, but might be a handy function to stick have happen automatically (see section Customizing Articles).

All these “hiding” commands are toggles, but if you give a negative prefix to these commands, they will show what they have previously hidden. If you give a positive prefix, they will always hide.

Also see section Article Highlighting for further variables for citation customization.

See section Customizing Articles, for how to hide article elements automatically.

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

3.18.4 Article Washing

We call this “article washing” for a really good reason. Namely, the A key was taken, so we had to use the W key instead.

Washing is defined by us as “changing something from something to something else”, but normally results in something looking better. Cleaner, perhaps.

See section Customizing Articles, if you want to change how Gnus displays articles by default.

C-u g

This is not really washing, it’s sort of the opposite of washing. If you type this, you see the article exactly as it exists on disk or on the server.


Force redisplaying of the current article (gnus-summary-show-article). This is also not really washing. If you type this, you see the article without any previously applied interactive Washing functions but with all default treatments (see section Customizing Articles).

W l

Remove page breaks from the current article (gnus-summary-stop-page-breaking). See section Misc Article, for page delimiters.

W r

Do a Caesar rotate (rot13) on the article buffer (gnus-summary-caesar-message). Unreadable articles that tell you to read them with Caesar rotate or rot13. (Typically offensive jokes and such.)

It’s commonly called “rot13” because each letter is rotated 13 positions in the alphabet, e.g., ‘B’ (letter #2) -> ‘O’ (letter #15). It is sometimes referred to as “Caesar rotate” because Caesar is rumored to have employed this form of, uh, somewhat weak encryption.

W m

Morse decode the article buffer (gnus-summary-morse-message).

W i

Decode IDNA encoded domain names in the current articles. IDNA encoded domain names looks like ‘xn--bar’. If a string remain unencoded after running invoking this, it is likely an invalid IDNA string (‘xn--bar’ is invalid). You must have GNU Libidn (http://www.gnu.org/software/libidn/) installed for this command to work.

W t

Toggle whether to display all headers in the article buffer (gnus-summary-toggle-header).

W v

Toggle whether to display all headers in the article buffer permanently (gnus-summary-verbose-headers).

W o

Treat overstrike (gnus-article-treat-overstrike).

W d

Treat M****s*** sm*rtq**t*s according to gnus-article-dumbquotes-map (gnus-article-treat-dumbquotes). Note that this function guesses whether a character is a sm*rtq**t* or not, so it should only be used interactively.

Sm*rtq**t*s are M****s***’s unilateral extension to the character map in an attempt to provide more quoting characters. If you see something like \222 or \264 where you’re expecting some kind of apostrophe or quotation mark, then try this wash.


Translate many non-ASCII characters into their ASCII equivalents (gnus-article-treat-non-ascii). This is mostly useful if you’re on a terminal that has a limited font and doesn’t show accented characters, “advanced” punctuation, and the like. For instance, ‘ยป’ is translated into ‘>>’, and so on.

W Y f

Full deuglify of broken Outlook (Express) articles: Treat dumbquotes, unwrap lines, repair attribution and rearrange citation. (gnus-article-outlook-deuglify-article).

W Y u

Unwrap lines that appear to be wrapped citation lines. You can control what lines will be unwrapped by frobbing gnus-outlook-deuglify-unwrap-min and gnus-outlook-deuglify-unwrap-max, indicating the minimum and maximum length of an unwrapped citation line. (gnus-article-outlook-unwrap-lines).

W Y a

Repair a broken attribution line.

W Y c

Repair broken citations by rearranging the text. (gnus-article-outlook-rearrange-citation).

W w

Do word wrap (gnus-article-fill-cited-article).

You can give the command a numerical prefix to specify the width to use when filling.


Fill long lines (gnus-article-fill-long-lines).


Capitalize the first word in each sentence (gnus-article-capitalize-sentences).

W c

Translate CRLF pairs (i.e., ‘^M’s on the end of the lines) into LF (this takes care of DOS line endings), and then translate any remaining CRs into LF (this takes care of Mac line endings) (gnus-article-remove-cr).

W q

Treat quoted-printable (gnus-article-de-quoted-unreadable). Quoted-Printable is one common MIME encoding employed when sending non-ASCII (i.e., 8-bit) articles. It typically makes strings like ‘déjà vu’ look like ‘d=E9j=E0 vu’, which doesn’t look very readable to me. Note that this is usually done automatically by Gnus if the message in question has a Content-Transfer-Encoding header that says that this encoding has been done. If a prefix is given, a charset will be asked for.

W 6

Treat base64 (gnus-article-de-base64-unreadable). Base64 is one common MIME encoding employed when sending non-ASCII (i.e., 8-bit) articles. Note that this is usually done automatically by Gnus if the message in question has a Content-Transfer-Encoding header that says that this encoding has been done. If a prefix is given, a charset will be asked for.


Treat HZ or HZP (gnus-article-decode-HZ). HZ (or HZP) is one common encoding employed when sending Chinese articles. It typically makes strings look like ‘~{<:Ky2;S{#,NpJ)l6HK!#~}’.


Translate ANSI SGR control sequences into overlays or extents (gnus-article-treat-ansi-sequences). ANSI sequences are used in some Chinese hierarchies for highlighting.

W u

Remove newlines from within URLs. Some mailers insert newlines into outgoing email messages to keep lines short. This reformatting can split long URLs onto multiple lines. Repair those URLs by removing the newlines (gnus-article-unsplit-urls).

W h

Treat HTML (gnus-article-wash-html). Note that this is usually done automatically by Gnus if the message in question has a Content-Type header that says that the message is HTML.

If a prefix is given, a charset will be asked for. If it is a number, the charset defined in gnus-summary-show-article-charset-alist (see section Scrolling the Article) will be used.

The default is to use the function specified by mm-text-html-renderer (see (emacs-mime)Display Customization section ‘Display Customization’ in The Emacs MIME Manual) to convert the HTML. Pre-defined functions you can use include:


Use Gnus simple html renderer.


Use Gnus rendered based on w3m.


Use emacs-w3m.


Use w3m.


Use Links.


Use Lynx.


Use html2text—a simple HTML converter included with Gnus.

W b

Add clickable buttons to the article (gnus-article-add-buttons). See section Article Buttons.


Add clickable buttons to the article headers (gnus-article-add-buttons-to-head).

W p

Verify a signed control message (gnus-article-verify-x-pgp-sig). Control messages such as newgroup and checkgroups are usually signed by the hierarchy maintainer. You need to add the PGP public key of the maintainer to your keyring to verify the message.(1)

W s

Verify a signed (PGP, PGP/MIME or S/MIME) message (gnus-summary-force-verify-and-decrypt). See section Security.

W a

Strip headers like the X-No-Archive header from the beginning of article bodies (gnus-article-strip-headers-in-body).

W E l

Remove all blank lines from the beginning of the article (gnus-article-strip-leading-blank-lines).

W E m

Replace all blank lines with empty lines and then all multiple empty lines with a single empty line. (gnus-article-strip-multiple-blank-lines).

W E t

Remove all blank lines at the end of the article (gnus-article-remove-trailing-blank-lines).

W E a

Do all the three commands above (gnus-article-strip-blank-lines).


Remove all blank lines (gnus-article-strip-all-blank-lines).

W E s

Remove all white space from the beginning of all lines of the article body (gnus-article-strip-leading-space).

W E e

Remove all white space from the end of all lines of the article body (gnus-article-strip-trailing-space).

See section Customizing Articles, for how to wash articles automatically.

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

3.18.5 Article Header

These commands perform various transformations of article header.

W G u

Unfold folded header lines (gnus-article-treat-unfold-headers).

W G n

Fold the Newsgroups and Followup-To headers (gnus-article-treat-fold-newsgroups).

W G f

Fold all the message headers (gnus-article-treat-fold-headers).

W E w

Remove excessive whitespace from all headers (gnus-article-remove-leading-whitespace).

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

3.18.6 Article Buttons

People often include references to other stuff in articles, and it would be nice if Gnus could just fetch whatever it is that people talk about with the minimum of fuzz when you hit RET or use the middle mouse button on these references.

Gnus adds buttons to certain standard references by default: Well-formed URLs, mail addresses, Message-IDs, Info links, man pages and Emacs or Gnus related references. This is controlled by two variables, one that handles article bodies and one that handles article heads:


This is an alist where each entry has this form:

(regexp button-par use-p function data-par)

All text that match this regular expression (case insensitive) will be considered an external reference. Here’s a typical regexp that matches embedded URLs: ‘<URL:\\([^\n\r>]*\\)>’. This can also be a variable containing a regexp, useful variables to use include gnus-button-url-regexp and gnus-button-mid-or-mail-regexp.


Gnus has to know which parts of the matches is to be highlighted. This is a number that says what sub-expression of the regexp is to be highlighted. If you want it all highlighted, you use 0 here.


This form will be evaled, and if the result is non-nil, this is considered a match. This is useful if you want extra sifting to avoid false matches. Often variables named gnus-button-*-level are used here, See section Article button levels, but any other form may be used too.


This function will be called when you click on this button.


As with button-par, this is a sub-expression number, but this one says which part of the match is to be sent as data to function.

So the full entry for buttonizing URLs is then

("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)

This is just like the other alist, except that it is applied to the article head only, and that each entry has an additional element that is used to say what headers to apply the buttonize coding to:

(header regexp button-par use-p function data-par)

header is a regular expression.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ] Related variables and functions


See section Article button levels.


A regular expression that matches embedded URLs. It is used in the default values of the variables above.


The function to use for displaying man pages. It must take at least one argument with a string naming the man page.


Regular expression that matches a message ID or a mail address.


This variable determines what to do when the button on a string as ‘foo123@bar.invalid’ is pushed. Strings like this can be either a message ID or a mail address. If it is one of the symbols mid or mail, Gnus will always assume that the string is a message ID or a mail address, respectively. If this variable is set to the symbol ask, always query the user what to do. If it is a function, this function will be called with the string as its only argument. The function must return mid, mail, invalid or ask. The default value is the function gnus-button-mid-or-mail-heuristic.


Function that guesses whether its argument is a message ID or a mail address. Returns mid if it’s a message IDs, mail if it’s a mail address, ask if unsure and invalid if the string is invalid.


An alist of (RATE . REGEXP) pairs used by the function gnus-button-mid-or-mail-heuristic.


Face used on buttons.


Face used when the mouse cursor is over a button.

See section Customizing Articles, for how to buttonize articles automatically.

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

3.18.7 Article button levels

The higher the value of the variables gnus-button-*-level, the more buttons will appear. If the level is zero, no corresponding buttons are displayed. With the default value (which is 5) you should already see quite a lot of buttons. With higher levels, you will see more buttons, but you may also get more false positives. To avoid them, you can set the variables gnus-button-*-level local to specific groups (see section Group Parameters). Here’s an example for the variable gnus-parameters:

;; increase gnus-button-*-level in some groups:
(setq gnus-parameters
      '(("\\<\\(emacs\\|gnus\\)\\>" (gnus-button-emacs-level 10))
        ("\\<unix\\>"               (gnus-button-man-level 10))
        ("\\<tex\\>"                (gnus-button-tex-level 10))))

Controls the display of references to message IDs, mail addresses and news URLs. Related variables and functions include gnus-button-url-regexp, browse-url, and browse-url-browser-function.


Controls the display of Emacs or Gnus references. Related functions are gnus-button-handle-custom, gnus-button-handle-describe-function, gnus-button-handle-describe-variable, gnus-button-handle-symbol, gnus-button-handle-describe-key, gnus-button-handle-apropos, gnus-button-handle-apropos-command, gnus-button-handle-apropos-variable, gnus-button-handle-apropos-documentation, and gnus-button-handle-library.


Controls the display of references to (Unix) man pages. See gnus-button-man-handler.


Controls the display of message IDs, mail addresses and news URLs. Related variables and functions include gnus-button-mid-or-mail-regexp, gnus-button-prefer-mid-or-mail, gnus-button-mid-or-mail-heuristic, and gnus-button-mid-or-mail-heuristic-alist.

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

3.18.8 Article Date

The date is most likely generated in some obscure timezone you’ve never heard of, so it’s quite nice to be able to find out what the time was when the article was sent.

W T u

Display the date in UT (aka. GMT, aka ZULU) (gnus-article-date-ut).

W T i

Display the date in international format, aka. ISO 8601 (gnus-article-date-iso8601).

W T l

Display the date in the local timezone (gnus-article-date-local).

W T p

Display the date in a format that’s easily pronounceable in English (gnus-article-date-english).

W T s

Display the date using a user-defined format (gnus-article-date-user). The format is specified by the gnus-article-time-format variable, and is a string that’s passed to format-time-string. See the documentation of that variable for a list of possible format specs.

W T e

Say how much time has elapsed between the article was posted and now (gnus-article-date-lapsed). It looks something like:

Date: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago

To make this line updated continually, set the gnus-article-update-date-headers variable to the frequency in seconds (the default is nil).

W T o

Display the original date (gnus-article-date-original). This can be useful if you normally use some other conversion function and are worried that it might be doing something totally wrong. Say, claiming that the article was posted in 1854. Although something like that is totally impossible. Don’t you trust me? *titter*

See section Customizing Articles, for how to display the date in your preferred format automatically.

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

3.18.9 Article Display

These commands add various frivolous display gimmicks to the article buffer in Emacs versions that support them.

X-Face headers are small black-and-white images supplied by the message headers (see section X-Face).

Face headers are small colored images supplied by the message headers (see section Face).

Smileys are those little ‘:-)’ symbols that people like to litter their messages with (see section Smileys).

Picons, on the other hand, reside on your own system, and Gnus will try to match the headers to what you have (see section Picons).

Gravatars reside on-line and are fetched from http://www.gravatar.com/ (see section Gravatars).

All these functions are toggles—if the elements already exist, they’ll be removed.

W D x

Display an X-Face in the From header. (gnus-article-display-x-face).

W D d

Display a Face in the From header. (gnus-article-display-face).

W D s

Display smileys (gnus-treat-smiley).

W D f

Piconify the From header (gnus-treat-from-picon).

W D m

Piconify all mail headers (i.e., Cc, To) (gnus-treat-mail-picon).

W D n

Piconify all news headers (i.e., Newsgroups and Followup-To) (gnus-treat-newsgroups-picon).

W D g

Gravatarify the From header (gnus-treat-from-gravatar).

W D h

Gravatarify all mail headers (i.e., Cc, To) (gnus-treat-from-gravatar).


Remove all images from the article buffer (gnus-article-remove-images).


If you’re reading an HTML article rendered with gnus-article-html, then you can insert any blocked images in the buffer with this command. (gnus-html-show-images).

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

3.18.10 Article Signature

Each article is divided into two parts—the head and the body. The body can be divided into a signature part and a text part. The variable that says what is to be considered a signature is gnus-signature-separator. This is normally the standard ‘^-- $’ as mandated by son-of-RFC 1036. However, many people use non-standard signature separators, so this variable can also be a list of regular expressions to be tested, one by one. (Searches are done from the end of the body towards the beginning.) One likely value is:

(setq gnus-signature-separator
      '("^-- $"         ; The standard
        "^-- *$"        ; A common mangling
        "^-------*$"    ; Many people just use a looong
                        ; line of dashes.  Shame!
        "^ *--------*$" ; Double-shame!
        "^________*$"   ; Underscores are also popular
        "^========*$")) ; Pervert!

The more permissive you are, the more likely it is that you’ll get false positives.

gnus-signature-limit provides a limit to what is considered a signature when displaying articles.

  1. If it is an integer, no signature may be longer (in characters) than that integer.
  2. If it is a floating point number, no signature may be longer (in lines) than that number.
  3. If it is a function, the function will be called without any parameters, and if it returns nil, there is no signature in the buffer.
  4. If it is a string, it will be used as a regexp. If it matches, the text in question is not a signature.

This variable can also be a list where the elements may be of the types listed above. Here’s an example:

(setq gnus-signature-limit
      '(200.0 "^---*Forwarded article"))

This means that if there are more than 200 lines after the signature separator, or the text after the signature separator is matched by the regular expression ‘^---*Forwarded article’, then it isn’t a signature after all.

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

3.18.11 Article Miscellanea

A t

Translate the article from one language to another (gnus-article-babel).

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

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