Hi,

* s. keeling [04/13/02 03:11:49 CEST] wrote:
> On Sat, Apr 13, 2002 at 02:27:25AM +0200, Rocco Rutte wrote:
> > Try 'w3m -dump' for autoview.

> Thanks Rocco.  Problem solved.  Much appreciated.

No problem.   I  didn't  mention  the  manpages  for  those  3
text-mode browsers. Maybe you should read it.

> This works:

> macro index \cB |'w3m -m -cookie'\n 'call w3m to extract URLs out of a message'
> macro pager \cB |'w3m -m -cookie'\n 'call w3m to extract URLs out of a message'

> This doesn't:

> macro index \cB |'links'\n 'call links to extract URLs out of a message'
> macro pager \cB |'links'\n 'call links to extract URLs out of a message'

> The latter two just lock up mutt.  kill -HUP `pidof links` says
> "ERROR: could not get terminal size"

So, now that you know that the  'could  not  get  terminal...'
error from links is because it wants  to  run  in  interactive
mode, this is the same  problem here. The pipe is used to hand
the current mail/news over via stdin to a  program  specified.

So, the program must be abled to read from stdin. w3m is (IIRC
not documented  in the manpage), but links  isn't.  That means
that links ignores the input from  stdin  and  just wants   to
run with the URL given (none in your case).

If you really depend on links, I think a short wrapper  should
help:

#!/bin/sh
tee > $filename && links $filename && rm -f $filename

(or:  maybe  this  can  be  done  directly   in   the   macro)

Btw, if you want to extract URLs from a message body  why  not
use  UrlView  adjusted   to   use   your   favorite   browser?

Cheers, Rocco.

Attachment: msg27109/pgp00000.pgp
Description: PGP signature

Reply via email to