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

Re: Can one have two alternative programs to view text/html?



* "A. S. Budden" <mutt.mail@xxxxxxxxxxxxxxxxxxxxx> [2004-01-28 11:44:11 +0000]:
> Is it possible to set up mutt and mailcap so that by default it uses
> lynx (or other text mode browser) to view HTML mail but one can use
> a GUI browser (is that the word) as an option?
> 
> Normally I simply want to see the text of HTML E-Mail (that's all
> there is in most of them!) but occasionally they have pictures that I
> want to see.
> 

* Thus spake Chris Green:
> You can do this if you use autoview for the text mode, something like
> this:
> 
> text/html; mozilla.sh %s; test=InXTerm
> text/html; lynx -dump %s; nametemplate=%s.html; copiousoutput
> 
> Then when you open an html email, it'll be dumped to ascii and will be
> viewable in the normal pager, but if you hit 'v' or 'l' or whatever it
> is (I have a fairly heavily customised keyboard layout -- I use the vim
> keys for most things, so I can't remember what the proper key is) to get
> the attachments view up and load the html from there, it'll open in
> mozilla.

  Apologies for thread hijacking, but this is actually related.  ;)

  One of the things I always thought would be pretty cool was if the
autoview config command took another argument, a mailcap-format string
describing the desired behaviour.  In other words, instead of what we
have now:

autoview text/html

  ...you would have something like this:

autoview text/html 'lynx -force_html -dump %s'

  My logic behind this is that autoview is a controlled environment (in
the sense that it's always trying to display something as text), but
normal mailcap use (and it's not only used by mail clients, mind you)
can be anything.  As an example, I like to have mutt run "jpginfo" on my
JPEG attachments, so I can at least see some useful information.  Of
course, any other time I'm "running" a JPEG I want it displayed as a
picture.  To produce this effect now, I have to do clever things with
mutt-specific mailcap files, etc.  Anyway, just thought I'd request this
again.  Oh, and "uncolor" for body/header objects would be great too.
:)

-- 
  John  ! "Mulder, please explain to me the scientific significance
 Buttery! of 'the whammy'..."
www.io.c!
om/~john!  -- X-Files

Attachment: signature.asc
Description: Digital signature