<<< Date Index >>>     <<< Thread Index >>>

Re: Help needed to configure w3m as my HTML viewer



On Tuesday, August  5 at 09:51 PM, quoth Mun Johl:
I've been using w3m to render HTML messages within my mutt window for quite a while. My HTML mailcap entries are as follows:

text/html;$HOME/bin/mutt_opera %s text/html; w3m -dump %s; nametemplate=%s.html; copiousoutput

Looks good.

However, I've noticed that if I view an HTML file outside of mutt by executing "w3m <filename>" within the same terminal type (mrxvt) that the HTML file is rendered much better and the hyperlinks work.

Is there a configuration that will allow me to get the same type of w3m rendering within mutt that I get outside of mutt?

Mmmm, maybe, but probably not. Certainly you can't get the hyperlinks to work (those "work" because w3m is in charge of the terminal and directly interacting with the user, whereas when you use w3m within mutt, mutt is doing the user-interaction---you cannot send keypresses to w3m from within mutt). However, that the HTML is rendered "much better" is interesting. Better in what way? Is it still "much better" if you execute "w3m -dump <filename>" at the commandline? If it is, then there may be something in your environment that isn't getting passed on to w3m from mutt at the moment, that we can try to pass. If it isn't... well, then you're stuck. If the difference is *color*, you're also stuck. There's no way to force w3m to include the color encoding in it's dump output (short of editing the w3m source yourself), and mutt can only can only display the dump output. If, however, the "better" rendering is that w3m recognizes a larger terminal or is able to use more characters (e.g. line-drawing characters or accents) for display, then it's probably some environmental information that we can correct easily, and get it to display well in mutt.

For what it's worth, though, this is a question that's better suited for the mutt users mailing list than for the mutt developers mailing list.

~Kyle
--
Compassion is the basis of morality.
                                                -- Arnold Schopenhauer

Attachment: pgprAiO9_3UaT.pgp
Description: PGP signature