I have this in my .muttrc:
auto_view text/html application/pdf application/ics # attachment types to show
inline
alternative_order text/enriched text/plain text/html # preferred order to view
attachments
and this is my .mailcap:
text/html; /usr/bin/sensible-browser '%s'; description=HTML Text;
nametemplate=%s.html
text/html; /usr/bin/iceweasel '%s'; description=HTML Text; test=test -n
"$DISPLAY"; nametemplate=%s.html
text/html; /usr/bin/lynx -force_html '%s'; needsterminal; description=HTML
Text; nametemplate=%s.html
text/html; /usr/bin/links '%s'; needsterminal; description=HTML Text;
nametemplate=%s.html
text/html; /usr/bin/w3m -T text/html '%s'; needsterminal; description=HTML
Text; nametemplate=%s.html
text/html; /usr/bin/w3m -I %{charset} -dump -T text/html '%s'; copiousoutput;
description=HTML Text; nametemplate=%s.html
text/html; /usr/bin/links -dump '%s'; copiousoutput; description=HTML Text;
nametemplate=%s.html
text/html; /usr/bin/html2text '%s'; copiousoutput; description=HTML Text
text/html; /usr/bin/lynx -dump -force_html '%s'; copiousoutput;
description=HTML Text; nametemplate=%s.html
The result is, that the HTML part of a mail is displayed as plain text
in pager view, if there is no text part. Additionally, I can show the
attachments with "v" as You do and the browser will open and show the
HTML part of the mail. Under X11, iceweasel kicks in, on the virtual
console linx kicks in, because it has as first one the copiousoutput
option. If You would like to use links under X11, too, just move the
links entries up.
Hope this works for You,
Markus
On 24.02.14, LEVAI Daniel wrote:
Hi!
I have this in my ~/.mailcap:
text/html; links %s; needsterminal
And I didn't set auto_view for text/html in Mutt, but when I press Enter
or Space on the text/html part (after (v)iewing the message from index)
it just display the raw HTML.
I've been struggling with Mutt's mailcap handling for a while now, it
seems broken to me. For example, if I have these in .mailcap:
text/html; google-chrome %s; nametemplate=%s.html; test=test -n "$DISPLAY"
text/html; links -force-html %s; needsterminal; nametemplate=%s.html
... this should open the html file in chrome if $DISPLAY is set, and run
links otherwise. No such luck; Mutt just display the raw HTML.
Interesting thing is when I save a multipart message to a file, and open
it with metamail (`metamail something.mail`), then the above mailcap
entries work (except for the filename template, because it won't create
it with the .html extension...).
Daniel
--
LÉVAI Dániel
PGP key ID = 0x83B63A8F
Key fingerprint = DBEC C66B A47A DFA2 792D 650C C69B BE4C 83B6 3A8F
--
o o o o o o o . . . _~~~~~~~~~~~~~\_ _~~~~~~~~~~~~~~~~~~~~~~~~~\_
o _____ | | | |
.][__n_n_|DD[ ====_____ | Vielen Dank. | | Das hast Du gut gemacht. |
(________|__|_[_________]_|______________|_|__________________________|_
_/oo OOOOO oo` ooo ooo 'o^o^o o^o^o` 'o^o o^o`
=========================================================================