On 2010-03-16, peng shao <shallp...@gmail.com> wrote:
> On Tue, Mar 16, 2010 at 7:21 AM, Christian Ebert <blacktr...@gmx.net> wrote:
> >
> >
> >
> > Mmh, you could create an addional mailcap file and toggle the
> > $mailcap_path variable. Try the following (untested):
> >
> > set my_lynx_cap="/path/to/lynxmailcap"
> >
> > macro pager K1 "\
> > <enter-command> set my_mailcap_path=\$mailcap_path 
> > mailcap_path=$my_lynx_cap<enter>\
> > <exit><display-message>\
> > <enter-command> set mailcap_path=\$my_mailcap_path &my_mailcap_path<enter>" 
> > \
> > "autoview html with lynx"
> >
> > c
> Thanks a lot for such detailed and patient instructions. I just tested
> again the pipe method I sent to the maillist and I apologized I was
> totally out of track. Actually the following should be the correct
> 
> text/html; cat %s | iconv -f %{charset} -t utf-8  | elinks ; copiousoutput;
> 
> But this has a drawback---> If I press v to view the attachments and
> choose to view the text/html attachment then there will be a
> mistake--> I guess here the pipe is not allowed.

The pipe is allowed here.  If you are getting an error message from
using that rule, the problem is something other than the pipe.  The
problem could be the semicolon after copiousoutput--you don't need a
semicolon at the end of the line, only between terms, but I haven't
checked whether having one at the end of the line is an error.

> But it is not a big problem because I guess very few people need
> to view html message in this way. Also I didn't use lynx because
> for I don't why but among all text-based web-brower I tested,
> elinks is the only one can recognize pipe input as a "url" page
> and gives out the correct page.

You sometimes need to tell w3m that the input is HTML by using the
"-T text/html" option.

Regards,
Gary

Reply via email to