5.3 Rich text

In the old days, e-mail messages were just plain text; nowadays, many messages contain rich text (HTML), either as an alternative to a plain-text version or even as the only option. Of course, mu4e allows you to read such messages, and you can configure how it does that.

  1. The first thing to decide is whether you prefer the plain-text or the rich-text (HTML) version of messages, when both are available. By default, mu4e uses the ’richest’ format it can find. You can change this by setting the variable mu4e-view-prefer-plain-text to non-nil.

    You can toggle between the plain-text and HTML versions of a message using M-x mu4e-view-toggle-html or h. For plain-text messages without an HTML-part, an HTML part is generated.

  2. The second decision is how to show (render) these rich-text messages. This is controlled through the variable mu4e-view-html-renderer, which expects a symbol. You have two alternatives: shr, which is a renderer tightly integrated with Emacs and the message view, or xwidget, which is the richer, graphical option, based on the webkit web browser code (and only works in a graphical Emacs session).

Let’s discuss shr and xwidget in a bit more detail.