neomutt: Add html-email creation pipeline to compose menu
Hitting `,m` in the compose menu creates a dual txt/html email group when the highlighted file is written in (djot) markdown. Delete the original message afterwards to create a fully functional html email with plaintext fallback. Completely taken from: https://tom.wemyss.net/posts/neomutt-markdown-email/ with many thanks. What an amazing use of pipelines in neomutt!
This commit is contained in:
parent
4693f3f6dd
commit
a1a12cc54c
2 changed files with 36 additions and 0 deletions
|
|
@ -187,6 +187,17 @@ bind attach l view-mailcap
|
|||
# macro index x "<limit>all\n" "show all messages (undo limit)"
|
||||
# macro index \ci "<limit>~F\n" "Limit by flagged"
|
||||
|
||||
# Write (djot-flavored) markdown and instantly transform it into a TXT/HTML result
|
||||
# HTML-enabled email readers display that and others can still enjoy a txt representation
|
||||
macro compose ,m \
|
||||
"<enter-command>set pipe_decode<enter>\
|
||||
<pipe-message>pandoc -f gfm -t plain -o /tmp/msg.txt<enter>\
|
||||
<pipe-message>pandoc -s -f gfm --standalone --embed-resources -o /tmp/msg.html --template email<enter>\
|
||||
<enter-command>unset pipe_decode<enter>\
|
||||
<attach-file>/tmp/msg.txt<enter>\
|
||||
<attach-file>/tmp/msg.html<enter>\
|
||||
<tag-entry><previous-entry><tag-entry><group-alternatives>" \
|
||||
"Convert markdown to HTML5 and plaintext alternative content types"
|
||||
|
||||
#
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue