diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2020-05-20 10:54:57 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2020-05-20 10:54:57 +1200 |
commit | 1dae970cc3b4f769523ae8ebfb1cbe52d9583520 (patch) | |
tree | 751fa294b98eb4c04ecfc9f6937082e67dce9ad8 /mutt | |
parent | Show OpenPGP headers (diff) | |
download | dotfiles-1dae970cc3b4f769523ae8ebfb1cbe52d9583520.tar.gz dotfiles-1dae970cc3b4f769523ae8ebfb1cbe52d9583520.zip |
Fix some spacing in Makefile
Diffstat (limited to 'mutt')
-rw-r--r-- | mutt/filters/markdown-to-html.sh | 7 | ||||
-rw-r--r-- | mutt/muttrc | 12 |
2 files changed, 19 insertions, 0 deletions
diff --git a/mutt/filters/markdown-to-html.sh b/mutt/filters/markdown-to-html.sh new file mode 100644 index 00000000..cdba8ace --- /dev/null +++ b/mutt/filters/markdown-to-html.sh @@ -0,0 +1,7 @@ +printf 'text/html\n\n' +sed 's/ $/ /;/[^ ]$/s/$/ /;s/^-- $/-- /' | +pandoc \ + --from markdown_strict+smart \ + --metadata=pagetitle:HTML \ + --standalone \ + --to html4 diff --git a/mutt/muttrc b/mutt/muttrc index bf4de5af..161385db 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -160,6 +160,18 @@ send-hook '!~G !~g' 'push <pgp-menu><enter>' set autocrypt set autocrypt_dir = ~/.local/share/mutt/autocrypt +# Set custom filter to generate an HTML part for plain-text messages in +# Markdown style; defaults to off, per God's will and common decency +# +set send_multipart_alternative_filter \ + = ~/.local/libexec/mutt/filters/markdown-to-html + +# Toggle multipart sending option manually and display the new setting +macro generic,index,browser,pager \\h '\ +<enter-command>toggle send_multipart_alternative<enter>\ +<enter-command>set ?send_multipart_alternative<enter>' \ + 'Toggle multipart/alternative sending' + # Save message to whatever box Mutt guesses, without confirmation macro index,pager S \ '<save-message><enter>' \ |