mu4e: default to mu4e-shr2text when available
Make shr the default renderer for rich-text emails, if shr is available. Update the documentation.
This commit is contained in:
@ -1278,10 +1278,32 @@ case where the text-part is only a short blurb telling you to use the
|
||||
html-version; see @code{mu4e-view-html-plaintext-ratio-heuristic}},
|
||||
@t{mu4e} tries to convert the html into plain-text for display.
|
||||
|
||||
The default way to do that is to use the @command{emacs} built-in
|
||||
@code{html2text} function. However, you can set the variable
|
||||
@code{mu4e-html2text-command} to a either a shell command or a function
|
||||
With emacs 24.4 or newer, this defaults to @code{mu4e-shr2text}, which
|
||||
uses the built-in @t{shr} renderer. For older emacs versions, this
|
||||
defaults to the built-in @code{html2text} function. In practice, the
|
||||
latter gives much better results.
|
||||
|
||||
If you use @code{mu4e-shr2text}, it might be useful to emulate some of
|
||||
the @t{shr} key bindings, with something like:
|
||||
@lisp
|
||||
(add-hook 'mu4e-view-mode-hook
|
||||
(lambda()
|
||||
;; try to emulate some of the eww key-bindings
|
||||
(local-set-key (kbd "<tab>") 'shr-next-link)
|
||||
(local-set-key (kbd "<backtab>") 'shr-previous-link)))
|
||||
@end lisp
|
||||
|
||||
If you're using a dark theme, and the messages are hard to read, it can help to change
|
||||
the luminosity, e.g.:
|
||||
@lisp
|
||||
(setq shr-color-visible-luminance-min 80)
|
||||
@end lisp
|
||||
|
||||
If your emacs does not have @t{shr} yet, it can be useful to use a
|
||||
custom method. For that, you can set the variable
|
||||
@code{mu4e-html2text-command} to either a shell command or a function
|
||||
instead.
|
||||
| ||||