NEOmutt with html glasses

NEOmutt with html glasses

In this post I created a macro to open those annoying html e-mails with your favorite browser. Well, with neomutt I did not manage it to make it work so I went on a different approach. Arguably, a more elegant.

So, (neo)mutt has the mailcap file which is a file that tells (neo)mutt how to open a file tipe from it.

So if I write in the mailcap file this:

text/html;      w3m -v -F -T text/html -dump %s;        copiousoutput

it tells (neo)mutt that any text/html file should be opened with w3m with these arguments and copiousoutput will tell to open in the internal pager (this can set to be an external pager, however my default is internal).

So, what I did was add another rule for text/html, and create a macro to go for it. In other words

mailcap file

text/html; firefox %s;
text/html;      w3m -v -F -T text/html -dump %s;        copiousoutput

muttrc file

macro index,pager F "<view-attachments><search>html<enter><view-mailcap><exit>"

/comments ~lucasemmoreira/opinions@lists.sr.ht?Subject=Re: NEOmutt with html glasses