Merge pull request #575 from jeansch/master
mu4e: Let not be stuck into *mu4e-output* after rendering html. Reduce by one levels of (with-temp-buffer.
This commit is contained in:
@ -177,15 +177,17 @@ be changed by setting `mu4e-view-prefer-html'."
|
|||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(insert html)
|
(insert html)
|
||||||
(cond
|
(cond
|
||||||
((stringp mu4e-html2text-command)
|
((stringp mu4e-html2text-command)
|
||||||
(let* ((tmp-file (make-temp-file "mu4e-html")))
|
(let* ((tmp-file (make-temp-file "mu4e-html")))
|
||||||
(write-region (point-min) (point-max) tmp-file)
|
(write-region (point-min) (point-max) tmp-file)
|
||||||
(mu4e-process-file-through-pipe tmp-file mu4e-html2text-command)
|
(erase-buffer)
|
||||||
(delete-file tmp-file)))
|
(call-process-shell-command mu4e-html2text-command tmp-file t t)
|
||||||
|
(delete-file tmp-file)))
|
||||||
((functionp mu4e-html2text-command)
|
((functionp mu4e-html2text-command)
|
||||||
(funcall mu4e-html2text-command))
|
(funcall mu4e-html2text-command))
|
||||||
(t (mu4e-error "Invalid `mu4e-html2text-command'")))
|
(t (mu4e-error "Invalid `mu4e-html2text-command'")))
|
||||||
(buffer-string)))
|
(buffer-string))
|
||||||
|
)
|
||||||
(t ;; otherwise, an empty body
|
(t ;; otherwise, an empty body
|
||||||
""))))
|
""))))
|
||||||
;; and finally, remove some crap from the remaining string; it seems
|
;; and finally, remove some crap from the remaining string; it seems
|
||||||
|
|||||||
Reference in New Issue
Block a user