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

Re: Inline HTML not processed properly



On Fri, Dec 05, 2003 at 05:00:54PM +0100, Michael Tatge wrote:
> * On Fri, Dec 05, 2003 David Yitzchak Cohen (lists+mutt_users@xxxxxxxxxxxxxx) 
> muttered:
> > On Tue, Dec 02, 2003 at 11:36:33PM +0100, Michael Tatge wrote:

> > > mailcap:
> > > # when you view an attachment
> > > text/html; w3m -v -F -T text/html '%s'
> > text/html; w3m -v -F -T text/html '%s'; needsterminal
> > 
> > This version needs a terminal, since it takes over your monitor and
> > keyboard (and optionally mouse too, if you let it).
> > 
> > > # for autoview
> > > text/html; lynx -dump -force_html '%s'; copiousoutput; needsterminal
> > text/html; lynx -dump -force_html '%s'; copiousoutput
> > 
> > This version doesn't, since it's simply outputting the text.
> 
> Works for me. Consulting the manpage, the needsterminal part is
> ommitable anyway.

Yeah, the needsterminal is (a) simply a requirement test, so your first
version works just fine even if a terminal is available (although another
MIME implementation could just as easily not provide your w3m a terminal,
and then w3m would panic while trying to startup, and you'd never even
find out why).  (My first version will correctly fail if an attempt is
made by some program to view HTML without making a terminal available
to it and without wanting copiousoutput (i.e., lots of output), but in
practice, as the manpage notes, that's not likely to ever occur in the
wild.)  The needsterminal is also (b) overriden by copiousoutput at least
in Mutt's MIME implementation (since anything that needs a terminal should
fail in a terminalless context (the autoview context, for instance),
but doesn't in Mutt - I suppose there'd be much surprise if the program
actually attempted to use the terminal), so your second version works
just fine even though it's an oxymoron.  (If it produces huge quantities
of plain text on stdout, it shouldn't need a terminal, too.)

...so yeah, your versions work fine in Mutt at least (at least for now),
but you should probably correct them when you get the chance, since it
may save you headaches at some future point. . .

 - Dave

-- 
Uncle Cosmo, why do they call this a word processor?
It's simple, Skyler.  You've seen what food processors do to food, right?

Please visit this link:
http://rotter.net/israel

Attachment: pgpwhDFuVLIXk.pgp
Description: PGP signature