[Techtalk] pdfs and mutt

Akkana Peck akkana at shallowsky.com
Tue Mar 18 10:50:04 EST 2003


I'm not really following Emma Jane's description of what she used to
see, what she sees now, and what she wants to see for html mail in
mutt.  But here are the mutt settings I use, and I'm fairly happy
with them: html messages get printed clearly, and they get included
properly in replies.  I don't think I have any color, but maybe there's
a lynx/links/w3m setting to do that (I haven't looked).  

The only thing I'm not happy with is that none of {lynx|links|w3m}
properly quotes html mail quotes (<blockquote type="cite"> or
<blockquote cite=""> so they're hard to tell from the rest of the text
(indented at a slightly different level).  Some day I'll figure out how
to add that to one of the programs (the links source base looks easiest
to extend, though mozilla already handles that (heh, I wrote that code)
so I might write a mozilla-based program to do it.

Anyway, here's what I have in .muttrc:
auto_view text/html 

and here's what I have in .mailcap:
# Set up a handler for html for mutt to use.
# The effect of this is that mutt auto-displays using lynx,
# but you can show each attachment in Netscape via the attachment
# screen.
# Unfortunately, it still doesn't pick up attached images.
text/html; mimehelper /usr/local/netscape/netscape -remote 'openURL(file://%s)'; nametemplate=%s.html
# text/html; w3m -T text/html -dump %s; copiousoutput
text/html; lynx -dump %s; nametemplate=%s.html; copiousoutput

(use either the lynx line or the w3m line, or substitute links).  

Here's what this does: 

When an html message comes in, mutt uses the last text/html handler
and runs the message through lynx, so it's shown just like a text message
(typically I don't even realize that it's html until someone else on the
list starts flaming about html mail :-).  Replies also use this handler,
so the lynx output is included in the reply.

But now and then, I get a message where I really need to see the html in
a browser ("Hey, Akkana, check out this neat CSS trick!"), so for those,
I type v in mutt to see the attachment list, arrow down to the html
part, and hit return.  For that, mutt uses the first mime handler instead
of the second one, and calls mozilla -remote to display the page on my
currently running mozilla.  If unfortunately doesn't show inline images
that are sent as part of the mail with mime multipart-related; I haven't
found any way to get mutt to handle those.

	...Akkana


More information about the Techtalk mailing list