mu4e: Used temporary file instead of region to call the html renderer. (fix encoding issues)

This commit is contained in:
Jean Schurger 2015-02-03 15:44:21 -05:00
parent e84f5d307f
commit d63f1b3114
1 changed files with 5 additions and 2 deletions

View File

@ -178,8 +178,11 @@ be changed by setting `mu4e-view-prefer-html'."
(insert html)
(cond
((stringp mu4e-html2text-command)
(shell-command-on-region (point-min) (point-max)
mu4e-html2text-command nil t))
(let* ((tmp-file (make-temp-file "mu4e-html")))
(write-region (point-min) (point-max) tmp-file)
(mu4e-process-file-through-pipe tmp-file mu4e-html2text-command))
(delete-file tmp-file)
)
((functionp mu4e-html2text-command)
(funcall mu4e-html2text-command))
(t (mu4e-error "Invalid `mu4e-html2text-command'")))