mutt, bidi, t-prot solution
Boruch Baum
boruch_baum at gmx.com
Mon Jul 17 20:42:49 IDT 2017
This is for anyone of you who use mutt as your e-mail client, and like
me until just a few minutes ago, couldn't get the `t-prot' display
pre-processor to play nicely with bidi (using the command-line `bidiv'
program).
The trick that's working for me on the emails I currently have
available to test with, is to set `bidiv's line width parameter very
very wide. Like 400 characters wide!
Here's the relevant snippet from my .muttrc:
#+BEGIN_SRC conf
# ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
# ┃ Display filtering ┃
# ┃ ┃
# ┃ M-0 Turn off ┃
# ┃ M-1 Turn on t-prot / bidiv ┃
# ┃ ┃
# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
set my_tprot='bidiv -w400 | t-prot -cmekatlS --max-lines=250 --bigq \
--pgp-short --pgp-move-vrf -Mmutt -L/etc/t-prot/footers \
-A/etc/t-prot/ads'
set display_filter=$my_tprot
macro generic \e0 ":unset display_filter\n" \
"Turn OFF all display filters"
macro generic \e1 ":set display_filter='$my_tprot'\n" \
"Turn ON tprot / bidiv display filter"
macro pager \e0 \
":unset display_filter; exec exit\n:exec display-message\n" \
"Turn OFF all display filters"
macro pager \e1 \
":set display_filter='$my_tprot'; exec exit\n:exec display-message\n" \
"Turn ON tprot / bidiv display filter"
# highlight tprot elements
color body brightmagenta default "^\\[---.*"
color body green default "^#v[-+]"
#+END_SRC
--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0
More information about the Linux-il
mailing list