On 26Jun2014 13:55, raf <m...@raf.org> wrote:
i used to have this in my mutt mailcap file:

   text/html; lynx -dump %s; copiousoutput

and it was good. it formatted the html and gave me a list of
referenced urls at the bottom.

for some reason i can't remember, i changed it to:

   text/html; w3m -I %{charset} -T text/html -dump; copiousoutput;

which does the formatting but doesn't give a list of referenced urls
at the bottom so it's less useful.

if i change it back to using the "lynx -dump" command then i see the
raw html instead of the formatted html (as though i'd used "lynx -source"
rather than "lynx -dump").

i suspect that must be why i changed it to use w3m in the past.

anyway, if i save the html attachment and run lynx -dump on it
then it shows me the formatting page with the list of referenced
urls like it used to but that isn't what happens when mutt invokes
the same command when autoviewing the attachment.

does anyone have any idea why this might be the case or what i can
do to make lynx work again for autoviewing html in mutt?

I would do two things:

First: inspect the message. Is the HTML attachment actually marked
as "text/html" as its content-type? If not, the wrong filter (if
any) will be chosen from your mailcap file. For example, if the
contenttype header for the attachment is text/plain, mutt will
(correctly) transcribe the HTML unformatted.

Second: if the message has the HTML marked as text/html, check that the correct line is being selected from your mailcap file. I would be inclined to make a shell script (mine is called "unhtml") and put the lynx (or w3m) incantation inside it. Then hack the script:

  #!/bin/sh
  exec 2>>$HOME/unhtml.err
  set -vx
  lynx -dump ${1+"$@"}

Then "tail -F" the unhtml.err file to check that your script is being fired.

Cheers,
Cameron Simpson <c...@zip.com.au>

Careful and correct use of language is a powerful aid to straight thinking,
for putting into words precisely what we mean necessitates getting our own
minds quite clear on what we mean.      - W.I.B. Beveridge

Reply via email to