34.13 Display of Messages

This section describes how Rmail displays mail headers, MIME sections and attachments, URLs, and encrypted messages.


Toggle display of complete header (rmail-toggle-header).

Before displaying each message for the first time, Rmail reformats its header, hiding uninteresting header fields to reduce clutter. The t (rmail-toggle-header) command toggles this, switching between showing the reformatted header fields and showing the complete, original header. With a positive prefix argument, the command shows the reformatted header; with a zero or negative prefix argument, it shows the full header. Selecting the message again also reformats it if necessary.

The variable rmail-ignored-headers holds a regular expression specifying the header fields to hide; any matching header line will be hidden. The variable rmail-nonignored-headers overrides this: any header field matching that regular expression is shown even if it matches rmail-ignored-headers too. The variable rmail-displayed-headers is an alternative to these two variables; if non-nil, this should be a regular expression specifying which headers to display (the default is nil).

Rmail highlights certain header fields that are especially interesting—by default, the ‘From’ and ‘Subject’ fields. This highlighting uses the rmail-highlight face. The variable rmail-highlighted-headers holds a regular expression specifying the header fields to highlight; if it matches the beginning of a header field, that whole field is highlighted. To disable this feature, set rmail-highlighted-headers to nil.

If a message is in MIME (Multipurpose Internet Mail Extensions) format and contains multiple parts (MIME entities), Rmail displays each part with a tagline. The tagline summarizes the part’s index, size, and content type. Depending on the content type, it may also contain one or more buttons; these perform actions such as saving the part into a file.


Hide or show the MIME part at point (rmail-mime-toggle-hidden).


Move point to the next MIME tagline button. (rmail-mime-next-item).


Move point to the previous MIME part (rmail-mime-previous-item).


Toggle between MIME display and raw message (rmail-mime).

Each plain-text MIME part is initially displayed immediately after its tagline, as part of the Rmail buffer (unless the message has an HTML part, see below), while MIME parts of other types are represented only by their taglines, with their actual contents hidden. In either case, you can toggle a MIME part between its displayed and hidden states by typing RET anywhere in the part—or anywhere in its tagline (except for buttons for other actions, if there are any). Type RET (or click with the mouse) to activate a tagline button, and TAB to cycle point between tagline buttons.

The v (rmail-mime) command toggles between the default MIME display described above, and a raw display showing the undecoded MIME data. With a prefix argument, this command toggles the display of only an entity at point.

If the message has an HTML MIME part, Rmail displays it in preference to the plain-text part, if Emacs can render HTML20. To prevent that, and have the plain-text part displayed instead, customize the variable rmail-mime-prefer-html to a nil value.

To prevent Rmail from handling MIME decoded messages, change the variable rmail-enable-mime to nil. When this is the case, the v (rmail-mime) command instead creates a temporary buffer to display the current MIME message.

If the current message is an encrypted one, use the command C-c C-d (rmail-epa-decrypt) to decrypt it, using the EasyPG library (see EasyPG in EasyPG Assistant User’s Manual).

You can highlight and activate URLs in the Rmail buffer using Goto Address mode:

(add-hook 'rmail-show-message-hook 'goto-address-mode)

Then you can browse these URLs by clicking on them with mouse-2 (or mouse-1 quickly) or by moving to one and typing C-c RET. See Activating URLs.



This capability requires that Emacs be built with libxml2 support or that you have the Lynx browser installed.