Re: How to let mutt always mark mbox as new if it contains new

2009-05-08 Thread Chris Jones
On Fri, May 08, 2009 at 09:15:47PM EDT, John J. Foster wrote:

> I could be totally off the mark here, but I believe the problem is
> mutt's interpretation of new mail vs. your (and my) interpretation of
> new mail (unread mail). I have always believed, and still do, that
> unread mail is the same as new mail. 

You are mistaken.

> Although I understand mutt's logic, I think it is wrong. After all,
> they still show it with an "N" flag! But over 5 years I have learned
> to live with it.

I totally disagree.

I think mutt's logic makes excellent sense .. Especially in this list, I
routinely get mail that I couldn't care less about .. from regular
posters I know are past redemption.. 

I don't see why I should go to the trouble of having to delete their
contributions.

I don't have much time, so I ignore them.

I feel mutt's logic is 100% correct.. telling me there are _new_ posts
on top of stuff I intially couldn't be bothered to delete and not take
into account whatever garbage I didn't have the time & patience to get
rid of.

Nothing personal, I assure you.

:-)

CJ




Re: utf8 file corruption after transmission over email

2009-05-08 Thread zion
On Fri, May 08, 2009 at 04:34:14PM -0700, zion wrote:
> Well, I just captured smtp session of loopback interface (same box where
> mutt is running). Here is the relevant part:
>   03d0: 746f 3e38 353c 2f74 6f3e 0d0a 0909 093c  to>85.<
>   03e0: 7265 6164 3e21 d091 e288 9ae2 9591 3c2f  read>!п.Б..Б..   
>   03f0: 7265 6164 3e0d 0a09 0909 3c77 7269 7465  read>. 
> As you can see, this character is already messed up before reaching
> server. So, @gmail is not guilty here ;-).
Turns out it's my locale. having this causes the problem:
LC_CTYPE=ru_RU.KOI8-R
if LC_CTYPE is unset, file doesn't get corrupted.


Re: How to let mutt always mark mbox as new if it contains new

2009-05-08 Thread John J. Foster
On Fri, May 08, 2009 at 11:17:37PM +0800, Wu, Yue wrote:
> No, just new emails remain the new mark, but the mbox that contains them not.
> On Fri, May 08, 2009 at 10:24:30AM -0400, Patrick Shanahan wrote:

I could be totally off the mark here, but I believe the problem is
mutt's interpretation of new mail vs. your (and my) interpretation of
new mail (unread mail). I have always believed, and still do, that
unread mail is the same as new mail. Although I understand mutt's
logic, I think it is wrong. Afterall, they still show it with an "N"
flag! But over 5 years I have learned to live with it.

festus
-- 
I just want to break even.


pgpJK09rvAmUq.pgp
Description: PGP signature


Re: How to let mutt always mark mbox as new if it contains new

2009-05-08 Thread Patrick Shanahan
* Wu, Yue  [05-08-09 20:26]:
> > 
> > It more likely is that he expects a folder with new mail to have the
> > "N" flag for the folder which contains new mail but not newer than his
> > last access to that folder.
> 
> No, I expect the "N" flag always there, no matter the access time, if
> has new mail, than "N" should be always there.
>

Sorry, that is not the way mutt is programmed.  Once you access the
mbox file the "N" flag is gone until it receives a new message.

-- 
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: How to let mutt always mark mbox as new if it contains new

2009-05-08 Thread Wu, Yue
On Fri, May 08, 2009 at 04:53:50PM -0700, Gary Johnson wrote:
> 
> I don't think this is Wu Yue's problem, Patrick.  I could be wrong,
> but as I understand him, he is opening a mailbox, leaving some of
> the messages unread, then changing to another mailbox, then checking
> to see which mailboxes contain new mail (perhaps with the y
> command), and sees that the first mailbox has no N in front of it,
> indicating that it contains no new messages, although in fact it
> does.

Yes. But my problem remains after quit and restart mutt, the new marks of
mailboxs are gone, no matter it contains new mails actually.

On Fri, May 08, 2009 at 08:03:53PM -0400, Patrick Shanahan wrote:
> 
> If that is indeed the case, I believe it is a timing problem as I use
> mbox and do see "N" for folders which have received mail after my
> leaving.  I do not know the amount of time necessary for this to occur
> but can confirm that it does indeed happen.  Also new mail appears in
> the current folder periodically.
> 
> It more likely is that he expects a folder with new mail to have the
> "N" flag for the folder which contains new mail but not newer than his
> last access to that folder.

No, I expect the "N" flag always there, no matter the access time, if has new
mail, than "N" should be always there.
> 
> Now I hope I am making myself clear as I feel that I have my tongue
> wrapped around my eye-teeth  :^)

Thank you very much for kindly patient!

-- 
Hi,
Wu, Yue


Re: How to let mutt always mark mbox as new if it contains new

2009-05-08 Thread Wu, Yue
On Fri, May 08, 2009 at 07:37:45PM -0400, Patrick Shanahan wrote:
> * Wu, Yue  [05-08-09 18:26]:
> > 
> > >From the manpage of muttrc, it says mark_old is for:
> > 
> > > Controls whether or not mutt marks new unread messages as old if you
> > > exit a mailbox without reading them.
> > 
> > So it's for message, not for mbox. My issue is that when I enter into
> > mbox then change to others, then the mbox's new mark will gone, no
> > matter if the mbox contains new messages or not.
> 
> Mutt inserts a "flag" into each message header according to your
> configuration.  If you examine the header of a message flagged as
> "old" you will see "Status: O" near the last header line.

Please see my reply carefully... I have had set the mark_old to no, and I
repeatly said the *mbox*'s new mark is gone, no old mark or other marks at
all.

> 
> Since you had previously used mutt configured to "mark_old" and mutt
> did as it was told, you must those messages which have already been
> flagged.  To do this:
> 
> T~O;N
> 
> Enter the above characters and the entire visible listing will have
> the "old" flagged messages changed to "new".

I have set the mark_old to no, so I have disabled it, and it works fine for
*message* but not for *mbox*.
> 
> > Maybe I didn't describe myself clearly, so make you misunderstand?
> > Sorry for my bad English.
> 
> Yes, you have made your problem clear.  But once the "new" messages
> have been marked/flagged as "old" changing the configuration will not
> automagically change them back to "new".  The key sequence I displayed
> above "T~O;N" will change the entire current mbox file.
> 
> And since you have set "mark_old" to "off" or "unset", you will not
> see this happen any more.

-- 
Hi,
Wu, Yue


Re: How to let mutt always mark mbox as new if it contains new

2009-05-08 Thread Patrick Shanahan
* Gary Johnson  [05-08-09 19:57]:
> 
> I don't think this is Wu Yue's problem, Patrick.  I could be wrong,
> but as I understand him, he is opening a mailbox, leaving some of
> the messages unread, then changing to another mailbox, then checking
> to see which mailboxes contain new mail (perhaps with the y
> command), and sees that the first mailbox has no N in front of it,
> indicating that it contains no new messages, although in fact it
> does.
> 
> If that is the problem, then I see that problem with my
> installation, too.  I don't have a solution other than to quit and
> restart mutt.

If that is indeed the case, I believe it is a timing problem as I use
mbox and do see "N" for folders which have received mail after my
leaving.  I do not know the amount of time necessary for this to occur
but can confirm that it does indeed happen.  Also new mail appears in
the current folder periodically.

It more likely is that he expects a folder with new mail to have the
"N" flag for the folder which contains new mail but not newer than his
last access to that folder.

Now I hope I am making myself clear as I feel that I have my tongue
wrapped around my eye-teeth  :^)

-- 
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: How to let mutt always mark mbox as new if it contains new

2009-05-08 Thread Gary Johnson
On 2009-05-08, Patrick Shanahan  wrote:
> * Wu, Yue  [05-08-09 18:26]:
> > 
> > Do you me I should fix it manually?
> 
>  :^), yes
> 
> > >From the manpage of muttrc, it says mark_old is for:
> > 
> > > Controls whether or not mutt marks new unread messages as old if you
> > > exit a mailbox without reading them.
> > 
> > So it's for message, not for mbox. My issue is that when I enter into
> > mbox then change to others, then the mbox's new mark will gone, no
> > matter if the mbox contains new messages or not.
> 
> Mutt inserts a "flag" into each message header according to your
> configuration.  If you examine the header of a message flagged as
> "old" you will see "Status: O" near the last header line.
> 
> Since you had previously used mutt configured to "mark_old" and mutt
> did as it was told, you must those messages which have already been
> flagged.  To do this:
> 
> T~O;N
> 
> Enter the above characters and the entire visible listing will have
> the "old" flagged messages changed to "new".
> 
> > Maybe I didn't describe myself clearly, so make you misunderstand?
> > Sorry for my bad English.
> 
> Yes, you have made your problem clear.  But once the "new" messages
> have been marked/flagged as "old" changing the configuration will not
> automagically change them back to "new".  The key sequence I displayed
> above "T~O;N" will change the entire current mbox file.
> 
> And since you have set "mark_old" to "off" or "unset", you will not
> see this happen any more.
> 
> I hope I have made this clear for you.  :^)

I don't think this is Wu Yue's problem, Patrick.  I could be wrong,
but as I understand him, he is opening a mailbox, leaving some of
the messages unread, then changing to another mailbox, then checking
to see which mailboxes contain new mail (perhaps with the y
command), and sees that the first mailbox has no N in front of it,
indicating that it contains no new messages, although in fact it
does.

If that is the problem, then I see that problem with my
installation, too.  I don't have a solution other than to quit and
restart mutt.

HTH,
Gary




Re: How to let mutt always mark mbox as new if it contains new

2009-05-08 Thread Patrick Shanahan
* Wu, Yue  [05-08-09 18:26]:
> 
> Do you me I should fix it manually?

 :^), yes

> >From the manpage of muttrc, it says mark_old is for:
> 
> > Controls whether or not mutt marks new unread messages as old if you
> > exit a mailbox without reading them.
> 
> So it's for message, not for mbox. My issue is that when I enter into
> mbox then change to others, then the mbox's new mark will gone, no
> matter if the mbox contains new messages or not.

Mutt inserts a "flag" into each message header according to your
configuration.  If you examine the header of a message flagged as
"old" you will see "Status: O" near the last header line.

Since you had previously used mutt configured to "mark_old" and mutt
did as it was told, you must those messages which have already been
flagged.  To do this:

T~O;N

Enter the above characters and the entire visible listing will have
the "old" flagged messages changed to "new".

> Maybe I didn't describe myself clearly, so make you misunderstand?
> Sorry for my bad English.

Yes, you have made your problem clear.  But once the "new" messages
have been marked/flagged as "old" changing the configuration will not
automagically change them back to "new".  The key sequence I displayed
above "T~O;N" will change the entire current mbox file.

And since you have set "mark_old" to "off" or "unset", you will not
see this happen any more.

I hope I have made this clear for you.  :^)
-- 
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: utf8 file corruption after transmission over email

2009-05-08 Thread zion
Well, I just captured smtp session of loopback interface (same box where
mutt is running). Here is the relevant part:
  03d0: 746f 3e38 353c 2f74 6f3e 0d0a 0909 093c  to>85.<
  03e0: 7265 6164 3e21 d091 e288 9ae2 9591 3c2f  read>!п.Б..Б...

Re: utf8 file corruption after transmission over email

2009-05-08 Thread zion
On Fri, May 08, 2009 at 06:04:42PM -0500, Kyle Wheeler wrote:
> On Friday, May  8 at 03:00 PM, quoth Aaron S.:
> > I have a mystery that I'm trying to solve to no avail.
> 
> Hopefully we can help!
> 
> > I got a little sample XML (utf-8) encoded file that I'm trying to 
> > send as attachment. When I attach it, mutt correctly identifies it: 
> > [text/plain, 8bit, utf-8, 0.3K], since there are non-ASCII 
> > characters, in this case there is only 1 such character.
> 
> Well, actually, that's an incorrect identification. It's NOT a 
> text/plain file, it's an xml file. According to RFC 3023, it should 
> either be sent as application/xml or as text/xml.
> 
> Now, that misidentification shouldn't cause the problem you're having, 
> but correcting it *probably* will fix the problem. I bet that if you 
> add the following to your ~/.mime.types file, the problem goes away:
> 
>  application/xml jff
> 
> > After I send it, this attached file becomes currupt.
> 
> I tried sending your file to myself, both with and without that line 
> in my mime.types file, and the file didn't get corrupted either way.
> 
> My guess is that this is ACTUALLY your mail server's fault (did you 
> send it through an MSFT Exchange server maybe? They're really bad 
> about this). Here's what I think happened: you have configured mutt to 
> send things in 8-bit mode (i.e. $allow_8bit). Thus, when sending a 
> utf-8 file attachment with an unusual character in it, mutt sent it 
> completely unmodified, because that's supposed to be safe to do when 
> sending in 8-bit mode. But some servers (and I've had this happen more 
> often than not with Exchange servers) attempt to convert all messages 
> into 7-bit form. Unfortunately, they're often very bad at it. I've had 
> several messages corrupted by Exchange servers simply because they 
> couldn't handle curly-quotes correctly. It's happened often enough 
> that I finally just unset allow_8bit so that mutt would always take 
> care of encoding my messages in a 7-bit safe manner, because mutt is 
> so much better at it than they are.
> 
> Anyway, does that help?
Hello,
Well, it was sent from @gmail to another @gmail
account. I have no idea what they run there at google. I thought about
adding that to mime.types and it does work.
What bothers me is that now I have to pay much closer attention as to
when I'm attaching strange files.
I'm gonna have to think of a way to intercept whatever mutt is sending
out to make sure it's not mutt that messes up this 3byte UTF-8
character.

In any case, thanks for your pointers.


Re: utf8 file corruption after transmission over email

2009-05-08 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On Friday, May  8 at 03:00 PM, quoth Aaron S.:
> I have a mystery that I'm trying to solve to no avail.

Hopefully we can help!

> I got a little sample XML (utf-8) encoded file that I'm trying to 
> send as attachment. When I attach it, mutt correctly identifies it: 
> [text/plain, 8bit, utf-8, 0.3K], since there are non-ASCII 
> characters, in this case there is only 1 such character.

Well, actually, that's an incorrect identification. It's NOT a 
text/plain file, it's an xml file. According to RFC 3023, it should 
either be sent as application/xml or as text/xml.

Now, that misidentification shouldn't cause the problem you're having, 
but correcting it *probably* will fix the problem. I bet that if you 
add the following to your ~/.mime.types file, the problem goes away:

 application/xml jff

> After I send it, this attached file becomes currupt.

I tried sending your file to myself, both with and without that line 
in my mime.types file, and the file didn't get corrupted either way.

My guess is that this is ACTUALLY your mail server's fault (did you 
send it through an MSFT Exchange server maybe? They're really bad 
about this). Here's what I think happened: you have configured mutt to 
send things in 8-bit mode (i.e. $allow_8bit). Thus, when sending a 
utf-8 file attachment with an unusual character in it, mutt sent it 
completely unmodified, because that's supposed to be safe to do when 
sending in 8-bit mode. But some servers (and I've had this happen more 
often than not with Exchange servers) attempt to convert all messages 
into 7-bit form. Unfortunately, they're often very bad at it. I've had 
several messages corrupted by Exchange servers simply because they 
couldn't handle curly-quotes correctly. It's happened often enough 
that I finally just unset allow_8bit so that mutt would always take 
care of encoding my messages in a 7-bit safe manner, because mutt is 
so much better at it than they are.

Anyway, does that help?

~Kyle
- -- 
Anyway, have fun.
And don't bother reporting any bugs for the next few days. I won't 
care anyway.
-- Linus Torvalds, when kernel 2.4 came out
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iQIcBAEBCAAGBQJKBLqJAAoJECuveozR/AWeBBQP/j1tOe19BTFKo/AN4gzcDhTS
72ug8j7pY3M75W7DJ33Bx3p6gafGEwaiHh6mePt/0L4YuHzGpZxhog9FmmzptJmG
1ROfdmkJ4DYH7zrXTHvLBufrp1I/hlAGqsogncrs+N/gLV6QNzJno3FnY9xkVbxe
DNm3MgkksZ1U9uMXyhrHsoJ+NQ01zuzP6BtEp1uVQKOHnluEd8jzyR9Dow5j5/8A
zp84PLMCvHn5UIQl1cf8qoUGFSfznBmK6xMgBDXCy/bghjwliGdPsy8n3Y0VhD6V
16vqx3qcTwoSbbTaQcyqY++v82TvQAz8izat23C1OWxWnYoAiy5lEjMv5FBh5UkO
dyDZKAWM4XmM05c1GexEcmhfvAHOQ2Il93hluKA7ZIFGeDfyz4Hl+dkeY7aSX2ek
6caHXz+jQnRz6hgBnwk1GcoTDwdmAdtU8XZYCjYHo+1BotMyKzMcE7c/483pj4Kb
dOpluhcPXsjnHKJK3wvRzT9lQqfGy4XFU6SuxXIH8TIxucAvlw+ZWrwUdpx1btIm
tH1ESVyIr4RoAm8viVl/OUdZ2apF8an9faxMwa80YBVGog9TxfoCy0jYOxs0g9YW
KLhPmaeeHaBaFpeha//MN8zcMxNknx7WsFvg2eL7XyMoUj3s2LhlWE6eQu0Luijc
3NWylNKI3jMswtfFtUyQ
=Hbvl
-END PGP SIGNATURE-


Re: wrong charset

2009-05-08 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On Friday, May  8 at 06:08 PM, quoth Luis A. Florit:
>>> But I have three charsets:
>>>
>>> $charset=//TRANSLIT 
>>> ?charset=utf-8
>>
>> What? That doesn't make any sense. Are those two lines actually in 
>> your muttrc?
>
> The only thing in my .muttrc is 'set charset=//TRANSLIT'.

Try removing that from your muttrc entirely.

> But no matter how I change that, the result is always utf-8.

H. That suggests that something somewhere else is changing it. Is 
there a systemwide muttrc that's setting the $charset maybe? If you 
tell mutt to use a null muttrc (e.g. `mutt -F /dev/null`) does it 
still say that $charset is utf-8?

> When I do ':set charset' I get 'charset="//TRANSLIT"' (as expected, 
> although in this case it means UTF-8 despite of the fact that my 
> xterm is ISO-8859-1).

What makes you think it means utf-8?

> If I change to iso-8859-1, I get accented characters as \123.

That's because your $charset doesn't match your locale.

In any case, a value of iso-8859-1//TRANSLIT should remedy that.

> I have always used as locale 'LANG=en_US' in a ISO-8859-1 rxvt 
> console, and 'charset=\\TRANSLIT' or iso-8859-1 in muttrc, and 
> everything worked fine. So I don't think this has to do with 
> locales. It seems that mutt does not understand the osso-xterm...?

The terminal shouldn't matter in this case.

Okay, before we get too twisted up here, first, let's make sure your 
locale setup is correct. Since perl is usually sensitive to proper 
locale settings, try doing this:

 perl -e ""

That SHOULD do nothing at all. If it complains, then your locale 
settings are invalid. To prove that it will complain if your locale is 
invalid, try this:

 env LC_ALL=nocharset perl -e ""

That *should* generate a big ugly warning.

But, if perl is happy and mutt with a null config file thinks $charset 
should be utf-8, then your pt_BR locale is set up to only work with 
utf-8.

>> 1. When you run mutt, it reports that the charset it thinks is 
>> appropriate is utf-8
>
> Yes, if I use 'set charset=//TRANSLIT'

So... don't do that.

>> 2. Nothing you seem to do can convince mutt to avoid utf-8
>
> No, now it accepts 'set charset=iso-8859-1', but still displays 
> accented characters as \123.

Right. Because the $charset doesn't match the locale environment 
settings (i.e. what your computer thinks the charset should be based 
on the LANG and/or LC_CTYPE variables isn't iso-8859-1 for some 
reason).

Hopefully, we're making progress.

~Kyle
- -- 
The next best thing to solving a problem is finding some humor in it.
  -- Frank A. Clark
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iQIcBAEBCAAGBQJKBLZ/AAoJECuveozR/AWe9JoP/jD/y4zd6vL+Gh9qLvl2UXr0
dLeQ8MkUJgiTC5CSD8w1vcsto6yjMu4u1cfFDi0EnGwm5WjY66wYi1MsMAGC3clV
z75a4CGRD6IqI0RE04HhEeUFbfwIefVDowciDteoQ7/3wJbL6H6WIJYxhdvU05TE
rm1zYhdMvJwFcS1QWrpoYNbFXlkHgCIZcK8EHQ/InMkIiAOFt+huEpj9B+rITof1
wt0AfS6CkynRk8g9JndNX/c/eAobjSrEyZqoeetmHlLrgmiX+Kr+4Zgzzc2Pe/J+
qnJojEJBl1jNK9ZCqxlVJKdtUTn+xeNFma9YOQBa13oMZXWeQbcPVAVbfZQ9efxQ
qG9qQ2Ae2bSD+gCOc89YbLSbdGWQ3APaAQHNSlJv8+U3OoFgJ/Gbed+0P56CJ0kv
0RM3MoWS4rQ15uNOmxFQ2pbnXxVE+QmdG66uiKuuCLPaSBpAgjM4G9QC/Ta5LaPy
Dgjq6e1pmOex7A9HezCmY57GL3ZqTLleNP+o1yeBXxp7yJ+rbahCLez2xJDiBkgh
j7C68LfImDscpGjWP5aG4lWiF40EswdSqQthncNjx5/Jd9DJ/P8lsWlD5jOcoBPf
XvHyLC66oNX+pRKxS3LpS6clh3Jn9zj7ucagJIdAlECyv8khIcABeuNkWVHIgW/I
ceW7jQu3txjZNUcrMXZp
=ntT5
-END PGP SIGNATURE-


Re: How to let mutt always mark mbox as new if it contains new

2009-05-08 Thread Wu, Yue
On Fri, May 08, 2009 at 12:20:13PM -0400, Patrick Shanahan wrote:
> * Wu, Yue  [05-08-09 11:20]:
> > 
> > No, just new emails remain the new mark, but the mbox that contains
> > them not. 
> 
> Ah, then you must correct those that have already been marked "O".
> 
> t~O;N
> 
> 
> all on the same line
> 
> explanation:
> t tag/tag-pattern
> ~Opattern, messages marked Old
> ; apply to all tagged messages
> N the new "flag"
> 
>hit the "enter" key
> 
> 
> Mutt has a "really good" man page and a manual attached normally to
> the "F1" key.

Do you me I should fix it manually?

>From the manpage of muttrc, it says mark_old is for:

> Controls whether or not mutt marks new unread messages as old if you  exit a
> mailbox without reading them.

So it's for message, not for mbox. My issue is that when I enter into mbox
then change to others, then the mbox's new mark will gone, no matter if the
mbox contains new messages or not.

Maybe I didn't describe myself clearly, so make you misunderstand? Sorry for
my bad English.

-- 
Hi,
Wu, Yue


utf8 file corruption after transmission over email

2009-05-08 Thread Aaron S.
Hello,
I have a mystery that I'm trying to solve to no avail. mutt-1.5.19 is
running on OpenBSD 4.5, "--with-idn". I got a little sample XML (utf-8)
encoded file that I'm trying to send as attachment. When I attach it,
mutt correctly identifies it: [text/plain, 8bit, utf-8, 0.3K], since
there are non-ASCII characters, in this case there is only 1 such
character. After I send it, this attached file becomes currupt. 

before I send it: MD5 (hw2.jff) = 9a14b9ac1a12deb07d262b6658d7b9b2
after:  MD5 (hw2.jff-corrupted) = 718597b09e7544f89cd255a5d4c8e301

this file contains a 'WHITE SQUARE' character, see
http://www.fileformat.info/info/unicode/char/25a1/index.htm

after examining both files here is what gets changed:
"0xE2 0x96 0xA1" becomes "0xD0 0x91 0xE2 0x88 0x9A 0xE2 0x95 0x91"

Both files are available for your inspection at:
http://www.x96.org/files/hw2.jff
http://www.x96.org/files/hw2.jff-corrupted

I appreciate your help.


Re: wrong charset

2009-05-08 Thread Luis A. Florit
* El 07/05/09 a las 23:24, Kyle Wheeler chamullaba:

> On Thursday, May  7 at 09:40 PM, quoth Luis A. Florit:
> > > On Monday, May  4 at 05:05 PM, quoth Luis A. Florit:
> > > > I use a ISO-8859-1 encoded xterm in maemo, but :set ?charset
> > > > gives me charset="utf-8".
> > >
> > > Are you setting it in your config somewhere? (test it my running
> > > `mutt - -F /dev/null` and seeing what the value of $charset is
> > > there)
> >
> > utf-8. No mater what I do...
> >
> > But I have three charsets:
> >
> > $charset=//TRANSLIT
> > ?charset=utf-8
>
> What? That doesn't make any sense. Are those two lines actually in
> your muttrc?

The only thing in my .muttrc is 'set charset=//TRANSLIT'. But no
matter how I change that, the result is always utf-8.

> I think at least part of the problem here is that you aren't
> understanding what ?charset means. The "charset" variable is almost
> always referred to as $charset, with the dollar sign. If you swap the
> dollar sign for a question mark, that's a way of telling mutt you want
> it to display the value of the variable. It's NOT a way to set the
> variable.

I see.

> In other words, "set ?charset=us-ascii" is completely bogus, and
> meaningless.

Sorry, I think I wasn't clear enough. In mutt console, you can
look for variables with the ':set' command. When I do
':set charset' I get 'charset="//TRANSLIT"' (as expected, although
in this case it means UTF-8 despite of the fact that my xterm is
ISO-8859-1). If I change to iso-8859-1, I get accented characters as \123.

> > In fact, it seems that I am not able to change that ?charset
> > variable to ISO-8859-1.
>
> So, if, while running mutt, you execute the command:
>
> :set charset=iso-8859-1
>
> What happens? Does an error get displayed?

Now it works... sorry. I should have been doing something silly.

> > > > I tried setting by hand LANG, LC_ALL, LC_CTYPE to pt_BR and
> > > > such, but no luck. No, pt_BR.ISO-8859-1 is not among the xterm
> > > > locales.
> > >
> > > Okay, I think the first thing you need to do here (aside from
> > > ensure that you're not setting $charset manually somewhere) is
> > > to find out what locales your machine supports. Something like
> > > this will probably work:
> > >
> > > locale -a | grep '^pt_BR'
> >
> > Just pt_BR. But I don't want to change the default language, just
> > the encoding.
>
> If pt_BR is the only pt_BR-related locale you have installed, then
> you're stuck with the default charset, whatever that happens to be.
> If you want access to other charsets (such as utf-8), you'll have to
> install additional locales (e.g. the locale named pt_BR.utf8).
>
> On debian, this can be done by using `dpkg-reconfigure locale`. I'm
> sure other distributions have similar means of installing/enabling
> additional locales.

I have always used as locale 'LANG=en_US' in a ISO-8859-1 rxvt
console, and 'charset=\\TRANSLIT' or iso-8859-1 in muttrc, and
everything worked fine. So I don't think this has to do with
locales. It seems that mutt does not understand the osso-xterm...?

> > > Whatever it outputs, those are the values your computer
> > > (currently) understands, and so those are the values that LANG
> > > or the LC_* variables can be set to.
> >
> > I see. But even if I set LC_ALL=pt_BR, I get the messages in
> > Portuguese but the encoding in UTF-8. Exactly the opposite that I
> > want.
>
> What do you mean "the encoding in UTF-8"? You mean the messages you
> receive are encoded in UTF-8? That's fine; it doesn't matter what
> the messages are encoded in, as long as mutt (and all the supporting
> libraries it uses) know what characters can be displayed, so that it
> can convert from the message's encoding to the correct encoding for
> display on your terminal.

My terminal is ISO-8859-1, so if mutt displays messages in UTF-8
it will be a mess. The whole and single issue is that mutt does not
display ISO-8859-1 chars in a correct way to my console.

> > > It's possible that if you really want your xterm to only display
> > > ISO-8859-1 characters, you may have to install the right character
> > > sets (how to do this is often distro-dependent).
> >
> > But my xterm works perfectly with ISO-8859-1, for example, vim does.
> > That is not the problem, but that mutt just does not want to
> > understand the encoding.
>
> Okay, we're over-using the term "encoding" here. Let's try and be
> clear about what's going on:
>
> 1. When you run mutt, it reports that the charset it thinks is
> appropriate is utf-8

Yes, if I use 'set charset=//TRANSLIT'

> 2. Nothing you seem to do can convince mutt to avoid utf-8

No, now it accepts 'set charset=iso-8859-1', but still displays
accented characters as \123.

> It sounds like somewhere in your mutt config, you're setting $charset
> to be utf-8, and then attempting (perhaps with the wrong syntax) to
> set it to be something else.

No, just one line with charset.

> Mutt's generally pretty good at figuring out the right $charset value
> to use, if 

Re: Sorting incoming mail by domain

2009-05-08 Thread Gary Johnson
On 2009-05-07, jac...@gmail.com wrote:
> On Thu, May 7, 2009 at 10:31, Haines Brown
> > To save a message in mutt, if I hit the "s" key I'm prompted
> > for a mailbox. However I'm used to saving messages as a plain text
> 
> I was super confused on this same issue for a while. Every so often i
> need a plain text copy of an email with headers and everything. Just
> hit "s", and give a path. It'll save just fine. It says it's saving as
> a mailbox, because it is. Just so happens mbox format mailbox is a
> bunch of plain text emails appended in a single file.
> 
> Also, you'll note the default behaviour of "s" is more like moving, so
> it'll mark the message for deletion. Just remove the delete flag. I'm
> sure you can macro "s" to behave more like a copy command.

There already is a copy command, copy-message, bound by default to
C.  There is also decode-copy, bound by default to C, that will
undo the message encoding, such as quoted-printable, before writing
the file.  You can type ? in the index or pager to see a list of
these commands.

Regards,
Gary




Re: Multiple color rules for index?

2009-05-08 Thread Rocco Rutte
Hi,

* Eric Patton wrote:

> Does '~l ! ~N'  mean 'color list mail yellow if it is not new', or...?

Yepp. Please start reading at:

  http://dev.mutt.org/doc/manual.html#complex-patterns

It's about searching, but mutt uses the same pattern syntax for coloring.

Rocco


Re: How to let mutt always mark mbox as new if it contains new

2009-05-08 Thread Patrick Shanahan
* Patrick Shanahan  [05-08-09 12:21]:
> * Wu, Yue  [05-08-09 11:20]:
> > 
> > No, just new emails remain the new mark, but the mbox that contains
> > them not. 
> 
> Ah, then you must correct those that have already been marked "O".
> 
> t~O;N
> 

My bad, sb:  T~0;N

> 
> all on the same line
> 
> explanation:

:
> t tag/tag-pattern

T  Tag-pattern

> ~Opattern, messages marked Old
> ; apply to all tagged messages
> N the new "flag"
> 
>hit the "enter" key
> 
> 
> Mutt has a "really good" man page and a manual attached normally to
> the "F1" key.
> 

-- 
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: How to let mutt always mark mbox as new if it contains new

2009-05-08 Thread Patrick Shanahan
* Wu, Yue  [05-08-09 11:20]:
> 
> No, just new emails remain the new mark, but the mbox that contains
> them not. 

Ah, then you must correct those that have already been marked "O".

t~O;N


all on the same line

explanation:
t   tag/tag-pattern
~O  pattern, messages marked Old
;   apply to all tagged messages
N   the new "flag"

   hit the "enter" key


Mutt has a "really good" man page and a manual attached normally to
the "F1" key.

-- 
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: Multiple color rules for index?

2009-05-08 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Friday, May  8 at 12:23 PM, quoth Eric Patton:
> Kyle Wheeler wrote:
>> Thus, list messages will only be yellow if they aren't new, because if 
>> they're new, they match both rules, and the last one wins.
>> 
>> Of course, you can always make complex patterns. For example:
>> 
>>  color index yellow default '~l ! ~N'
>> 
>> Does that help?
>
> Yes, this last line you wrote was what I was referring to - I don't know what 
> this syntax (!) means, and how to construct complex coloring patterns in 
> general.
>
> Does '~l ! ~N'  mean 'color list mail yellow if it is not new', or...?

Okay, color commands use the same matching syntax as searches and 
limits. In the manual and muttrc man page, this syntax is referred to 
as "simple patterns".

Generally, it's a list of AND'd conditions. So '~l ~N' matches 
messages that match both ~l AND match ~N... i.e. that are both from 
mailing lists AND are marked new. An exclamation mark means "not", and 
is associated with the pattern that immediately follows it. Thus, '~l 
! ~N' matches messages that match ~l AND match '! ~N', i.e. that are 
both from mailing lists AND are not marked new.

You can get far more complex, of course. The description in the muttrc 
man page is quite good.

~Kyle
- -- 
Computers are useless. They can only give you answers.
   -- Pablo Picasso
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iEYEARECAAYFAkoEVhUACgkQBkIOoMqOI15owwCgy0NPTWidx5Xizs/B0lsrFtOa
kvUAn3vjg46jR2H8ifGjRD/tzioarvqp
=TKh9
-END PGP SIGNATURE-


Re: Multiple color rules for index?

2009-05-08 Thread Eric Patton
Kyle Wheeler wrote:
> Thus, list messages will only be yellow if they aren't new, because if 
> they're new, they match both rules, and the last one wins.
> 
> Of course, you can always make complex patterns. For example:
> 
>  color index yellow default '~l ! ~N'
> 
> Does that help?

Yes, this last line you wrote was what I was referring to - I don't know what
this syntax (!) means, and how to construct complex coloring patterns in
general.

Does '~l ! ~N'  mean 'color list mail yellow if it is not new', or...?

-- 
Eric Patton


Re: How to let mutt always mark mbox as new if it contains new

2009-05-08 Thread Wu, Yue
On Fri, May 08, 2009 at 10:24:30AM -0400, Patrick Shanahan wrote:
> * Wu, Yue  [05-08-09 10:19]:
> > Currently, I find that if I enter to a mbox, then quit from it, the
> > mbox's N mark will be removed, no matter whether there are news mails
> > in it or not, not what I think preference for me. Can I configure it?
> > I have set the mark_old=no 
> 
> Then you have configured it.  Doesn't it work now?

No, just new emails remain the new mark, but the mbox that contains them not.
On Fri, May 08, 2009 at 10:24:30AM -0400, Patrick Shanahan wrote:

-- 
Hi,
Wu, Yue


Re: Multiple color rules for index?

2009-05-08 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Friday, May  8 at 10:56 AM, quoth Eric Patton:
> Is there a way to design multiple color rules for incoming mail in 
> the index? I want to have all new mail green, for instance, and if 
> the mail belongs to a known mailing list, color it as yellow after 
> it has been read.
>
> Currently, I can color mail yellow with ~l, and new mail green with 
> ~N, but I can't find the appropriate section in the docs to form a 
> conditional expression.

I'm not sure what you mean. What kind of condition?

Keep in mind that with color rules, order matters. Specifically, 
last-match wins. For example, to get all new mail green, no matter 
what, make the new mail rule last. i.e.:

 color index yellow default ~l
 color index green default ~N

Thus, list messages will only be yellow if they aren't new, because if 
they're new, they match both rules, and the last one wins.

Of course, you can always make complex patterns. For example:

 color index yellow default '~l ! ~N'

Does that help?

~Kyle
- -- 
In all matters of opinion, our adversaries are insane.
 -- Oscar Wilde
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iEYEARECAAYFAkoEQTwACgkQBkIOoMqOI17TMACaAiW4/Jt/aSSmm/HbmqDzaIOd
IYIAoOvYsExPQVc0wJ16t3U3kY8ehx1N
=ZbM7
-END PGP SIGNATURE-


Re: How to let mutt always mark mbox as new if it contains new emails?

2009-05-08 Thread Patrick Shanahan
* Wu, Yue  [05-08-09 10:19]:
> Currently, I find that if I enter to a mbox, then quit from it, the
> mbox's N mark will be removed, no matter whether there are news mails
> in it or not, not what I think preference for me. Can I configure it?
> I have set the mark_old=no 

Then you have configured it.  Doesn't it work now?

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


How to let mutt always mark mbox as new if it contains new emails?

2009-05-08 Thread Wu, Yue
Currently, I find that if I enter to a mbox, then quit from it, the mbox's N
mark will be removed, no matter whether there are news mails in it or not, not
what I think preference for me. Can I configure it? I have set the mark_old=no
-- 
Hi,
Wu, Yue


Re: Sort the mbox by arbitrary way?

2009-05-08 Thread Wu, Yue
On Fri, May 08, 2009 at 03:31:11PM +0200, Rejo Zenger wrote:
> ++ 08/05/09 21:09 +0800 - Wu, Yue:
> >On Fri, May 08, 2009 at 02:40:00PM +0200, Rejo Zenger wrote:
> >> ++ 08/05/09 20:35 +0800 - Wu, Yue:
> >> >When I start mutt -y to read the mbox mails, mutt always sort them by
> >> >alphabetic sequence, can I configure its sorting method to fit my 
> >> >preference?
> >> 
> >> I guess  is what you 
> >> are looking for?
> >
> >No, that's for index menu, but what I meant is folder menu, its contents is
> >defined by mailboxs command.
> 
> Then it is  
> what you are looking for I presume?

That's it exactly, thank you ! sorry for replying to your email, I don't know
why mutt do it for me.


-- 
Hi,
Wu, Yue


Multiple color rules for index?

2009-05-08 Thread Eric Patton
Is there a way to design multiple color rules for incoming mail in the index? I
want to have all new mail green, for instance, and if the mail belongs to a
known mailing list, color it as yellow after it has been read. 

Currently, I can color mail yellow with ~l, and new mail green with ~N, but I
can't find the appropriate section in the docs to form a conditional
expression.

-- 
Eric Patton


Re: Sort the mbox by arbitrary way?

2009-05-08 Thread Rejo Zenger
++ 08/05/09 20:35 +0800 - Wu, Yue:
>When I start mutt -y to read the mbox mails, mutt always sort them by
>alphabetic sequence, can I configure its sorting method to fit my preference?

I guess  is what you 
are looking for?



-- 
Rejo Zenger .  . 0x75FC50F3 . 
GPG encrypted e-mail prefered. 


signature.asc
Description: Digital signature


Sort the mbox by arbitrary way?

2009-05-08 Thread Wu, Yue
When I start mutt -y to read the mbox mails, mutt always sort them by
alphabetic sequence, can I configure its sorting method to fit my preference?

-- 
Hi,
Wu, Yue


Re: Set separate colors within mini-index

2009-05-08 Thread Eric Patton
Michael Tatge wrote:
> If by mini-index you mean pager_index_lines. Then no, the mini-index is
> what you see in the index. No way to get different colors for that.
> 
> HTH,
> 
> Michael
Yes, that was what I meant. Thanks for clearing that up. I guess I could use
fewer lines in pager_index_lines to reduce the noise.

Thanks,
-- 
Eric Patton


Re: Sorting incoming mail by domain

2009-05-08 Thread Christian Ebert
* Haines Brown on Friday, May 08, 2009 at 07:28:39 -0400
> Sorry to have dragged things off topic, but in short, my immediate
> question was resolved, which is that I can name a message whatever I
> want and subsequently move it from ~/Mail to where I want it. I work
> on material in terms of their location in several thousand
> subdirectories rather than separate files located by means of a
> subject line search such as provided by mutt. When I do have to
> search, I grep a subdirectory tree.

Sounds like you might be interested in mairix:

http://www.rpcurnow.force9.co.uk/mairix/

c
-- 
  Was heißt hier Dogma, ich bin Underdogma!
[ What the hell do you mean dogma, I am underdogma. ]
_F R E E_  _V I D E O S_  http://www.blacktrash.org/underdogma/
  http://www.blacktrash.org/underdogma/index-en.html


Re: Sorting incoming mail by domain

2009-05-08 Thread Haines Brown
> That's probably more information than you needed, but maybe that helps 
> you understand why mutt is doing what it's doing.

No, Kyle, the information was useful. Thank you.

> Hmm. Okay, I have a better idea of *what* you're doing, but still not 
> *why* you're doing it. Is this large and complex directory tree 
> convenient for some important piece of software?
> 
> I mean, based on what you've said so far, I can only assume that your 
> real goal here is that you want to be able to search and find your 
> email quickly, right? And then, once you've found them, you want to 
> read them with some piece of software... perhaps a text editor, 
> perhaps something like mutt (I assume that mutt's display of email is 
> sufficient for your needs?).

Sorry to have dragged things off topic, but in short, my immediate
question was resolved, which is that I can name a message whatever I
want and subsequently move it from ~/Mail to where I want it. I work
on material in terms of their location in several thousand
subdirectories rather than separate files located by means of a
subject line search such as provided by mutt. When I do have to
search, I grep a subdirectory tree.

Thanks, Kyle, for your patience and help.

Haines Brown