* peng shao on Tuesday, March 16, 2010 at 06:12:02 -0400
> On Tue, Mar 16, 2010 at 5:44 AM, Christian Ebert <blacktr...@gmx.net> wrote:
>> With lynx -dump? I doubt it.
>> 
> I use
> text/html; lynx -dump -force_html -assume-charset=%{charset}  %s;
> needsterminal; copiousoutput;
> in the mailcap and set autoview. Yes here I can see the [1] [2] [3]
> .... next to the hyperlink.

Oops, you're right, I was fixated on link coloring, sorry.
 
>> text/html; w3m -F -T text/html %s; nametemplate=%s.html; needsterminal
>> 
>> and do <view-attachments> (bound to "v" by default), and then,
>> after selecting the html attachment <view-mailcap> (bound to "m"
>> by default).
> I like this very much. But for me there is still some drawback, the
> %{charset} is lost :(

Try your local charset for w3m's -I option, Mutt seems to decode
the attachment before writing it to the temporary file:

text/html; w3m -F -I UTF-8 -T text/html %s; nametemplate=%s.html; needsterminal

where my $LANG is UTF-8. This also seems to work, and is more
flexible:

text/html; w3m -F -I `echo $LANG | cut -d '.' -f 2` -T text/html %s; 
nametemplate=%s.html; needsterminal

> Is there any possibility if I set autoview as off, and when I read an
> email, I can press a macro to activate autoview with a specific mime
> in my mailcap. For example, when I saw an email which contains lots of
> url and is in English, then I press a key K1 so the autoview of lynx
> pops up, if it is in Chinese then I can use w3m autoview by key K2

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
-- 
theatre - books - texts - movies
Black Trash Productions at home: <http://www.blacktrash.org/>
Black Trash Productions on Facebook:
<http://www.facebook.com/pages/Black-Trash-Productions/277569157339>

Reply via email to