display-hooking w3m / was: mutt for blind computerusers

2001-11-30 Thread Cristian

Hi Gary and all,

why didn't I come up with this workaround? I use w3m regularly - I
hacked my url_handler.sh into calling it when no Netscape is running
(hardly recently) and as long as Opera refuses to take remote commands
(although it says it understands them, Opera 5 and Opera 6 TP1 don't).

The workaround does not help Schoeppi a bit, of course, but it's an
interesting idea in its own right.

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?

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

Cristian

-- 

}{  Cristian Pietsch
}{  http://www.interling.de



msg20889/pgp0.pgp
Description: PGP signature


Re: display-hooking w3m / was: mutt for blind computerusers

2001-11-30 Thread Gary Johnson

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/ |



Re: display-hooking w3m / was: mutt for blind computerusers

2001-11-30 Thread Dan Boger

On Fri, Nov 30, 2001 at 12:40:36PM -0800, Gary Johnson wrote:
 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:
  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.

what if you set up a procmail filter, to add a header to messages with 3
or more urls, and then have mutt match that header?  would that work?

-- 
Dan Boger
[EMAIL PROTECTED]



msg20894/pgp0.pgp
Description: PGP signature


Re: display-hooking w3m / was: mutt for blind computerusers

2001-11-30 Thread Gary Johnson

On Fri, Nov 30, 2001 at 03:54:33PM -0500, Dan Boger wrote:
 On Fri, Nov 30, 2001 at 12:40:36PM -0800, Gary Johnson wrote:
  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:
   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.
 
 what if you set up a procmail filter, to add a header to messages with 3
 or more urls, and then have mutt match that header?  would that work?

Yes, I think that would work.

Gary

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



Re: display-hooking w3m / was: mutt for blind computerusers

2001-11-30 Thread MuttER

On Fri, Nov 30, 2001 at 08:48:04PM +0100, Cristian wrote:
 Hi Gary and all,
 
 why didn't I come up with this workaround? I use w3m regularly - I
 hacked my url_handler.sh into calling it when no Netscape is running
 (hardly recently) and as long as Opera refuses to take remote commands
 (although it says it understands them, Opera 5 and Opera 6 TP1 don't).
 
 The workaround does not help Schoeppi a bit, of course, but it's an
 interesting idea in its own right.
 
 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?
 
 Surely, your proposed solution will help me to read LinguistList
 digests, so thank you very much so far!
 
---end quoted text---

Cristian, it IS possible for Opera to take remote commands. I do it all
the time.  Try the following:  /usr/bin/opera '%s,new-window'

I use this with klipper in mandrake 8.0+.
-- 
Pat Shanahan   Registered Linux User #207535
Registered at: http://counter.li.org