ENH use pandoc instead of html2text for mu4e compose hook
This commit is contained in:
parent
44db205168
commit
710356ec06
|
@ -3097,8 +3097,11 @@ Since mu4e is an external program, need to check that it is installed before loa
|
|||
(html (and msg (plist-get msg :body-html)))
|
||||
;; oops, mu4e screwed up
|
||||
(mu4e-html2text-command
|
||||
(if (executable-find "html2text")
|
||||
"html2text --ignore-emphasis --images-to-alt --body-width=0"
|
||||
(if (executable-find "pandoc")
|
||||
;; use printf here to insert a newline in front of pandoc's output
|
||||
;; note that for some reason there needs to be a space in front
|
||||
;; of the newline or else it is stripped
|
||||
"printf \" \\n%s\" \"$(pandoc -f html -t plain --reference-links)\""
|
||||
'mu4e-shr2text)))
|
||||
(when (and html mu4e-view-prefer-html (member compose-type '(reply forward)))
|
||||
;; hackity hack, since the normal mu4e-message-body-text function
|
||||
|
|
Loading…
Reference in New Issue