* Anders Damsgaard <and...@adamsgaard.dk> [2021-11-22 12:05]: > * Globe Trotter via Mutt-users <mutt-users@mutt.org> [2021-11-22 00:47:10 > +0000]: > > > What is the recommended way to pretty-print mutt emails? I found a > > sourceforge perl script called muttprint but that was last updated in 2008, > > and I was wondering what folks here recommended? > > > > Thanks! > > Hi, > > I use the following sh(1) script to format the message as troff and > convert to pdf: https://adamsgaard.dk/tmp/muttprint-groff.sh > > It's a bit ugly in places, but it works for me. This is an example: > https://adamsgaard.dk/tmp/muttprint-example.pdf > > I bind it in my muttrc with the following: > > set print_command="$HOME/.config/mutt/muttprint-groff.sh"
Very nice. I find it simple and good. I would like to have the header fields rather aligned to left side. When using grep, I think `grep -m1' should be used to find the first match, as I wonder what would be the result if words like "From:" or "Date: " are found in the body of the email, not only in the header. I also think I can convert your script to use Asciidoctor instead of groff, https://asciidoctor.org/ -- so I will work on it. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/