color about w3m viewing in mutt

2010-03-16 Thread peng shao
Hi. I use w3m as an external program to view html mails in mutt. I
have the following in my mailcap

text/html; w3m -T text/html -I %{charset} -dump %s;
nametemplate=%s.html; copiousoutput

This works very well for me because w3m can handle the charset problem
very well. However, there is another problem--- if I use w3m to view
a website directly from terminal, then the w3m will mark any contents
which contain a url link as blue. This is very convenient. But if I
load w3m inside mutt, then w3m doesn't mark the url link as blue.
Sometimes I just missed the url in the mails my friend sent to me. I
can use urlview but sometimes the mail itself contains lots of useless
url. For lynx it simple mark a [number] next to the url so I can clear
see there is a url there. The only problem about lynx is it cannot
handle Chinese very well so I cannot use it :( Is there anyway to make
w3m to mark url as blue even it is loaded from mutt? Thanks.

Peng


Re: color about w3m viewing in mutt

2010-03-16 Thread peng shao
On Tue, Mar 16, 2010 at 5:44 AM, Christian Ebert blacktr...@gmx.net wrote:
 * peng shao on Tuesday, March 16, 2010 at 05:00:03 -0400

 Because you w3m -dump to standard output -- or in this case to
 Mutt's pager.

Okay I see, thanks.


 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. But one reason I cannot use lynx is
because I read lots of Chines emails everyday and the lynx seems to
support chinese charset very poorly :(



 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 :(
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


Thanks a lot

Peng


 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



Re: color about w3m viewing in mutt

2010-03-16 Thread peng shao
On Tue, Mar 16, 2010 at 6:12 AM, peng shao shallp...@gmail.com wrote:
 On Tue, Mar 16, 2010 at 5:44 AM, Christian Ebert blacktr...@gmx.net wrote:
much. But for me there is still some drawback, the
 %{charset} is lost :(
 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


 Thanks a lot

 Peng

I just found a maybe-stupid way to do this trick, I use a program
called elinks, along with iconv
in my mailcap I set
text/html; elinks -dump %s|iconv -f %{charset} -t utf-8 %s| elinks
%s;copiousoutput;

I use elinks because it looks to have better rendering effect. Thank
you for reminding me to use pipe---this works for me but I am not
sure I was correct, I just did some try and found occasionally it
worked for me. Please correct me if I made any mistake. Thanks.

Peng


Re: color about w3m viewing in mutt

2010-03-16 Thread Christian Ebert
* 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_capenter\
exitdisplay-message\
enter-command set mailcap_path=\$my_mailcap_path my_mailcap_pathenter \
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


mutt and gpg not in tune

2010-03-16 Thread Jan-Herbert Damm
hello all,

gpg and mutt used to work fine. now mutt won't find any public keys anymore. I
have run the following tests:


beginn gpg-test--- 
j...@herb:~$ cat test.txt
this is the content of test.txt

j...@herb:~$ gpg -se -r Markus test.txt

[prompted to enter my passphase]

pub  2048g/0F663F56 2009-07-17 Markus Dxxx x...@ari.uni-heidelberg.de

[...]

j...@herb:~$ gpg -d test.txt.gpg

[prompted to enter my passphase]

gpg: verschlüsselt mit 2048-Bit ELG-E Schlüssel, ID 0F663F56, erzeugt
2009-07-17
  Markus Dxxx x...@ari.uni-heidelberg.de
  gpg: verschlüsselt mit 2048-Bit ELG-E Schlüssel, ID A9EEDA47, erzeugt
  2008-11-30
Jan-Herbert Damm (email-verschlüsselung) jan-h-d...@web.de

this is the content of test.txt

[...]
end gpg-tests

Thus i reckon that gpg is working, though i am confused why i can decrypt the
testfile when i encrypted it with somebody elses pub-key.

In my muttrc I have:

---beginn muttrc---
set pgp_timeout=1800
set pgp_replyencrypt=yes
set pgp_sign_as=FA5B6661
set crypt_replyencrypt=yes  
set crypt_replysignencrypted
source /etc/Muttrc.d/gpg.rc 
end muttrc---

gpg.rc is is a standard ubuntu preinstalled file which has worked before. It
contains this line that seems to not be working correctly:

set pgp_encrypt_sign_command=/usr/lib/mutt/pgpewrap gpg %?p?--passphrase-fd
0? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u
%a? --armor --always-trust -- -r %r -- %f

I am at a loss of how to go about analyzing what's going wrong here. If
someone could tell me what else to try i am very grateful.

jan



Re: color about w3m viewing in mutt

2010-03-16 Thread peng shao
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_capenter\
 exitdisplay-message\
 enter-command set mailcap_path=\$my_mailcap_path my_mailcap_pathenter \
 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.  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.

So I guess I need your suggestion to toggle different application to
view html in attachment. I will test it later. Thanks a lot for the
suggestion:)

Peng


Re: color about w3m viewing in mutt

2010-03-16 Thread Gary Johnson
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_capenter\
  exitdisplay-message\
  enter-command set mailcap_path=\$my_mailcap_path my_mailcap_pathenter 
  \
  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



VIM Color Syntax

2010-03-16 Thread Chuck Smith
I know this is a little off topic for this list, but my latest update from 
Ubuntu resulted in color syntax in vim for reply messages in Mutt to disappear. 
Now everything is the default console green. Any ideas?

--
Chuck Smith



signature.asc
Description: Digital signature


Re: color about w3m viewing in mutt

2010-03-16 Thread peng shao
On Tue, Mar 16, 2010 at 10:32 AM, Gary Johnson garyj...@spocom.com wrote:
 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:
d.

 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.


I think I just missed needsterminal; here to make sure the pipe works well.

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

Wooo. Thanks for this.

I just realized another issue about lynx/elinks--- if they add a
[number] before urls in a html email view, then reply to the sender
will bring those [numbers] into the quotes, which is not desired :( On
the other hand w3m doesn't have this issue. Really frustrating.

Thank you.

 Regards,
 Gary




Mark messages as replied

2010-03-16 Thread Udo Hortian
Dear mutt users,

I am using mutt since years and love it. Still, sometimes it happens to
me, that I am beginning to reply to a message, I save it as a draft,
continue to edit it and send it at some moment. Then sometimes it
happens that the message I am replying to is not marked as read. I am
not sure about the exact circumstances when this happens. Still I would
like to make mutt to mark these messages as ready automatically or to
mark them as ready manually. Is there a way to mark messages as read
manually?

Best,
Udo.


Re: Mark messages as replied

2010-03-16 Thread Patrick Shanahan
* Udo Hortian udo_hort...@web.de [03-16-10 20:16]:
 Is there a way to mark messages as read manually?

Add the last header line:  Status: RO

-- 
Patrick Shanahan Plainfield, Indiana, USAHOG # US1244711
http://wahoo.no-ip.org Photo Album:  http://wahoo.no-ip.org/gallery2
Registered Linux User #207535@ http://counter.li.org


Re: Mark messages as replied

2010-03-16 Thread Gary Johnson
On 2010-03-17, Udo Hortian wrote:
 Dear mutt users,
 
 I am using mutt since years and love it. Still, sometimes it happens to
 me, that I am beginning to reply to a message, I save it as a draft,
 continue to edit it and send it at some moment. Then sometimes it
 happens that the message I am replying to is not marked as read. I am
 not sure about the exact circumstances when this happens. Still I would
 like to make mutt to mark these messages as ready automatically or to
 mark them as ready manually. Is there a way to mark messages as read
 manually?

Yes.  When in the Index Menu (the view that shows the messages in
the current mailbox) or in the Pager, type 'w' to set a status flag
or 'W' to clear a status flag.  Each command shows the list of
available flags.  You can find the meaning of the flags in the mutt
manual.  In your case, you probably want to clear the 'N' (New)
flag.

Alternatively, you can toggle the state of the New flag when you're
in the Index Menu by typing 'N'.

You can get a list of these and other commands by typing '?' in any
menu.

You can find out more about message status flags in the mutt manual
in the section The Message Index and in the table of Message
status flags.

Regards,
Gary