I’d like to view text/html attachments inline with auto_view. That’s easy enough, with a w3m -dump invocation in the .mailcap, and auto_view text/html in the .muttrc.
The tricky part is that i’d still like to invoke a browser session when i view the attachment explicitly. As though i had no -dump argument to my w3m mailcap entry.
I’ve tried to get this effect with two mailcap entries with different flags, but haven’t had any luck.
Some fiddling and some help from another source got me the answer to this question.
In the mailcap file, you can set up two entries:
There are two important parts here. First, the
copiousoutputflag indicates that entry is a useful candidate forauto_view. Second, the fact that there is another entry above it means that non-auto_viewuses (e.g. viewing it as an attachment) will try that first.So attachment views will use the first one,
auto_viewwill use the second one. Which is what i wanted.Source : http://www.mutt.org/doc/manual/manual-5.html#auto_view (See search order section)