mu4e: make it easy to use shr for viewing rich text message
new emacs versions have the shr html renderer; we can use it to render rich text messages. And some snippet to do so, and document it.
This commit is contained in:
@ -39,6 +39,19 @@
|
||||
(mu4e-headers-mark-all-unread-read)
|
||||
(mu4e-mark-execute-all t))
|
||||
|
||||
;;;
|
||||
|
||||
(defun mu4e-shr2text ()
|
||||
"Html to text using the shr engine; this can be used in
|
||||
`mu4e-html2text-command' in a new enough emacs. Based on code by
|
||||
Titus von der Malsburg."
|
||||
(interactive)
|
||||
(let ((dom (libxml-parse-html-region (point-min) (point-max))))
|
||||
(erase-buffer)
|
||||
(shr-insert-document dom)
|
||||
(goto-char (point-min))))
|
||||
|
||||
|
||||
;;; Bookmark handlers
|
||||
;;
|
||||
;; Allow bookmarking a mu4e buffer in regular emacs bookmarks.
|
||||
|
||||
Reference in New Issue
Block a user