[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mutt-users
Subject:    Re: Embebbing external interpreter in mutt
From:       Gary Johnson <garyjohn () spk ! agilent ! com>
Date:       2002-06-26 18:12:59
[Download RAW message or body]

On Wed, Jun 26, 2002 at 06:37:32PM +0100, Pedro Alves wrote:
> On Wed, Jun 26, 2002 at 10:12:45AM -0700, Gary Johnson wrote:
> > > % menu.  I don't think mutt currently supports that.
> > > 
> > > In that case, what about something like
> > > 
> > >   msg-hook .	'set pager=builtin'
> > >   msg-hook <pattern> 'set pager=lynx'
> > > 
> > > or so?  If you want lynx as a pager, just set lynx as the pager...
> > > [Note that this is untested, that I don't use msg-hook, and that
> > > there's probably a lovely default setting that might be better than 
> > > the all-matching default msg-hook.]
> > 
> > Good point.  You just have to see that mutt sends raw HTML to the pager.
> > You also reminded me of a similar discussion here last month in which I
> > wrote:
> > 
> 
> How can I make the pager recieve the HTML?

I tried to explain that in my previous post, but I guess I didn't do
very well.  If you put a line like this in your muttrc,

    auto_view text/html

mutt will look in the mailcap file to find out how to process the text/html
part of the message.  Then if you put this in your mailcap file,

    text/html; w3m %s; nametemplate=%s.html
    text/html; cat; copiousoutput

mutt will use the rule tagged with the copiousoutput field to process
the text/html part of the message.  In this case, mutt just pipes that
part of the message through cat before sending it to the pager.
Consequently, the pager will receive raw HTML.

Another way to do all this which might be simpler is to forget the
auto_view and mailcap and pager stuff and simply pipe the message
through the pager program, either the htmlviewer script from my other
post or just "w3m -T text/html" (or the lynx equivalent, if you prefer).
You could also create a macro to execute the pipe.  The disadvantage to
the piping approach is that it's not automatic--you have to know that
the message content is HTML.

HTH,
Gary

-- 
Gary Johnson                               | Agilent Technologies
garyjohn@spk.agilent.com                   | Spokane, Washington, USA
http://www.spocom.com/users/gjohnson/mutt/ |
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic