Reputation: 749
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.
Upvotes: 3
Views: 933
Reputation: 749
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:
text/html; w3m -I %{charset} -T text/html; needsterminal;
text/html; w3m -I %{charset} -dump -T text/html; copiousoutput;
There are two important parts here. First, the copiousoutput
flag indicates that entry is a useful candidate for auto_view
. Second, the fact that there is another entry above it means that non-auto_view
uses (e.g. viewing it as an attachment) will try that first.
So attachment views will use the first one, auto_view
will 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)
Upvotes: 3