On Fri, Nov 30, 2001 at 08:48:04PM +0100, Cristian wrote:

> On Fri, Nov 30, 2001 at 10:23:51AM -0800, Gary Johnson wrote:
> > Display-hooks let you set w3m as the pager for just those messages that
> > you know have a lot of embedded URLs, e.g.,
> > 
> >     display-hook ~A                         'set pager="builtin"'
> >     display-hook '~s "reg headlines"'       'set pager="w3m"'
> 
> Could you automate it? Could you find out whether there are more
> than, say, 3 URLs in a message body so it's worth to hand over control
> to w3m? Can you do it without slowing down the whole Mutt?

I don't think so.  The problem is that you would have to use an external
program to count the URLs and mutt doesn't send the message text to any
external program (e.g., "display_filter" or "pager") until it has
decided which pager it is going to use.  An external pager wrapper
program could select among a set of external pagers, but it couldn't
select mutt's internal pager.

I also have Ctrl-B mapped to use w3m instead of urlview, so invoking w3m
on a message I'm already reading with the built-in pager is pretty
simple.  I just wish I could tell w3m to always find and mark URLs as
links instead of having to type ':' each time.

> Surely, your proposed solution will help me to read LinguistList
> digests, so thank you very much so far!

You're welcome.

Gary

-- 
Gary Johnson                               | Agilent Technologies
[EMAIL PROTECTED]                   | Spokane, Washington, USA
http://www.spocom.com/users/gjohnson/mutt/ |

Reply via email to