5.3 HTML

Gnus can display HTML articles nicely formatted in the article buffer. There are many methods for doing that, but two of them are kind of default methods.

If your Emacs copy has been built with libxml2 support, then Gnus uses Emacs’ built-in, plain elisp Simple HTML Renderer shr 2 which is also used by Emacs’ browser EWW (see EWW in The Emacs Manual).

If your Emacs copy lacks libxml2 support but you have w3m installed on your system, Gnus uses that to render HTML mail and display the results in the article buffer (gnus-w3m).

For a complete overview, consult See Display Customization in The Emacs MIME Manual. This section only describes the default method.


If set to shr, Gnus uses its own simple HTML renderer. If set to gnus-w3m, it uses w3m.


External images that have URLs that match this regexp won’t be fetched and displayed. For instance, to block all URLs that have the string “ads” in them, do the following:

(setq gnus-blocked-images "ads")

This can also be a function to be evaluated. If so, it will be called with the group name as the parameter. The default value is gnus-block-private-groups, which will return ‘"."’ for anything that isn’t a newsgroup. This means that no external images will be fetched as a result of reading mail, so that nobody can use web bugs (and the like) to track whether you’ve read email.

If you have specific private groups that you want to have treated as if they were public groups, you can add the name of that group to the gnus-global-groups list.

Also see Misc Article for gnus-inhibit-images.


The width to use when rendering HTML. The default is 70.


How big pictures displayed are in relation to the window they’re in. A value of 0.7 (the default) means that they are allowed to take up 70% of the width and height of the window. If they are larger than this, and Emacs supports it, then the images will be rescaled down to fit these criteria.


If non-nil, display the cursor in the article buffer even when the article buffer isn’t the current buffer.

To use this, make sure that you have w3m and curl installed. If you have, then Gnus should display HTML automatically.



shr displays colors as declared in the HTML article but tries to adjust them in order to be readable. If you prefer more contrast, See FAQ 4-16.