mirror of https://github.com/djcb/mu.git
Merge pull request #897 from liweitianux/aly
mu4e: use builtin function "shr-render-region" for simplicity
This commit is contained in:
commit
a49ccf4ff0
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
(defcustom mu4e-html2text-command
|
(defcustom mu4e-html2text-command
|
||||||
(if (fboundp 'shr-insert-document) 'mu4e-shr2text 'html2text)
|
(if (fboundp 'shr-insert-document) 'mu4e-shr2text 'html2text)
|
||||||
|
|
||||||
"Either a shell command or a function that converts from html to plain text.
|
"Either a shell command or a function that converts from html to plain text.
|
||||||
|
|
||||||
If it is a shell-command, the command reads html from standard
|
If it is a shell-command, the command reads html from standard
|
||||||
|
@ -275,7 +275,7 @@ point in eiter the headers buffer or the view buffer."
|
||||||
`mu4e-html2text-command' in a new enough emacs. Based on code by
|
`mu4e-html2text-command' in a new enough emacs. Based on code by
|
||||||
Titus von der Malsburg."
|
Titus von der Malsburg."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((dom (libxml-parse-html-region (point-min) (point-max)))
|
(let (
|
||||||
;; When HTML emails contain references to remote images,
|
;; When HTML emails contain references to remote images,
|
||||||
;; retrieving these images leaks information. For example,
|
;; retrieving these images leaks information. For example,
|
||||||
;; the sender can see when I openend the email and from which
|
;; the sender can see when I openend the email and from which
|
||||||
|
@ -284,8 +284,7 @@ Titus von der Malsburg."
|
||||||
;; See this discussion on mu-discuss:
|
;; See this discussion on mu-discuss:
|
||||||
;; https://groups.google.com/forum/#!topic/mu-discuss/gr1cwNNZnXo
|
;; https://groups.google.com/forum/#!topic/mu-discuss/gr1cwNNZnXo
|
||||||
(shr-inhibit-images t))
|
(shr-inhibit-images t))
|
||||||
(erase-buffer)
|
(shr-render-region (point-min) (point-max))
|
||||||
(shr-insert-document dom)
|
|
||||||
(goto-char (point-min))))
|
(goto-char (point-min))))
|
||||||
|
|
||||||
(provide 'mu4e-message)
|
(provide 'mu4e-message)
|
||||||
|
|
Loading…
Reference in New Issue