### 4.7 Message Display

IMAIL provides several variables and commands to give you control over how messages are formatted in the message buffer.

By default, IMAIL automatically wraps long lines at the right margin. It uses adaptive fill 9 to do the wrapping, which means that common prefixes such as ‘`>`’ and ‘`Chris>`’ will be automatically copied down with the wrapped line. Generally, this wrapping makes messages easier to read. Specifically, it is important for messages sent by clients that use “soft” line breaks, because such clients expect the mail reader to wrap lines. However, if you’d rather not have IMAIL do this for you, you can disable wrapping by setting the variable `imail-auto-wrap` to `#f`.

Another feature of IMAIL is that it filters message headers, showing you only the most relevant ones. There are two variables that control how this is done, and a command that can override the filtering. The variable `imail-kept-headers` contains a list of regular expressions that are matched against message-header names (the name is everything to the left of the colon, e.g. ‘`From`’ in ‘`From: cph`’). If `imail-kept-headers` is a non-empty list, then only the headers matching those regular expressions are shown. Furthermore, the shown headers will be in the same order as the regular expressions.

If `imail-kept-headers` is an empty list, then all of the message headers are shown, except those matching the regular expression that is the value of the variable `imail-ignored-headers`. By default, the value of `imail-ignored-headers` contains some common uninteresting header names; this expression is identical to the default used by Rmail. Note that `imail-ignored-headers` is a single regular expression, while `imail-kept-headers` is a list of regular expressions. This is because `imail-ignored-headers` is meant to be an exact analog of the Rmail variable `rmail-ignored-headers`.

Regardless of how the message-header filtering is done, you can toggle between viewing the filtered headers and the unfiltered headers using the `t` command (`imail-toggle-header`). If filtered headers are shown, this command replaces them with unfiltered headers, and vice versa.

As you can see, IMAIL performs extensive transformation of a mail message before presenting it to you: MIME formatting, line wrapping, and header filtering. Sometimes, it’s desirable to see the original message, exactly as it was received, without any formatting at all. The command `C-c C-t C-m` toggles the entire message between a formatted view and a raw view. This should be used with care, as a message with a large attachment might not fit in memory in its raw form.

#### Footnotes

### (9)

See the online help for the variable `adaptive-fill-regexp` for more information about adaptive fill.