Re: How to count new emails in mbox format mailbox?

2009-12-26 Thread Wu, Yue
On Fri, Dec 25, 2009 at 04:22:34PM +, Christian Ebert wrote:
> * Wu, Yue on Friday, December 25, 2009 at 21:12:52 +0800
> > On Fri, Dec 25, 2009 at 11:56:44AM +, Christian Ebert wrote:
> >> egrep '^From [-a-za-z0-9@[-a-za-z0-9]+\.[a-za-z0-9]+ [A-Z][a-z]{2} 
> >> [A-Z][a-z]{2} [ 1-3][0-9] [0-2][0-9]:[0-5][0-9]:[0-5][0-9] [0-9]{4}$' mbox 
> >> | wc -l
> >> 
> >> But you might be fine with:
> >> 
> >> grep '^From ' mbox | wc -l
> > 
> > Thanks, but that's the one part that I want to solve... I'm not familiar 
> > with sh
> > script, the script I use for maildir is the follows:
> > 
> > mailhier=~/.mutt/mails
> > 
> > if [ $(find $mailhier -type f -print | wc -l) -ne 0 ]; then
> >for d in "$mailhier/"*
> >do
> >if [ $(find "$d" -type f -print | wc -l) -eq 0 ]; then
> >rm -r "$d"
> >fi
> >done
> > fi
> > 
> > I don't know how to do the same thing in sh script for mbox? Any one can 
> > figure
> > me out of it?
> 
> Ah, you just want to remove empty mailboxes, then perhaps just
> 
> save_empty=no
> 
> is enough?
> 
> Otherwise something like:
> 
> # delete all empty file inside $mailhier
> find $mailhier -type f -size 0 -exec rm -f {} \;
> 

Oh! I'm really sorry that I've sent a wrong script! ...

My script does this: count the mails in some particular maildir, then assign the
number to a var:


if [ -d ${mymaildir} -a $(find ${mymaildir} -type f -print | wc -l) -ne 0 ]; 
then
mailsnew="$(find ${mymaildir}/*/new -type f | wc -l | sed 's/ //g')"
# mails=$(($(find ${mymaildir}/*/cur -type f | wc -l | sed 's/ //g') + 
${mailsnew}))
if [ ${mailsnew} -ne 0 ]; then
if [ -d ${mymaildir}/private ]; then
privmailnew="$(find ${mymaildir}/private/new -type f | wc -l | sed 
's/ //g')/"
fi
if [ -d ${mymaildir}/inbox ]; then
inmailnew="$(find ${mymaildir}/inbox/new -type f | wc -l | sed 's/ 
//g')/"
fi
mailsfmt="[${privmailnew}${inmailnew}${mailsnew}]"
fi
fi

But I don't know how to transform this script to suit for mbox mails counting.

-- 
Hi,
Wu, Yue


Re: How to count new emails in mbox format mailbox?

2009-12-25 Thread Wu, Yue
On Fri, Dec 25, 2009 at 11:56:44AM +, Christian Ebert wrote:
> * Christian Ebert on Friday, December 25, 2009 at 11:45:34 +
> > * Wu, Yue on Friday, December 25, 2009 at 13:50:41 +0800
> >> Now I've changed to mbox from maildir, when with maildir, I use a sh 
> >> script to
> >> count the number of mails in directory new/ of each of my mails/ 
> >> sub-directory,
> >> but now I don't know how to achieve it with mbox, any hint will be 
> >> appreciated.
> > 
> > egrep '^From [-a-za-z0-9@[a-za-z0-9]+\.[a-za-z0-9]+ [A-Z][a-z]{2} 
> > [A-Z][a-z]{2} [ 1-3][0-9] [0-2][0-9]:[0-5][0-9]:[0-5][0-9] [0-9]{4}$' mbox 
> > | wc -l
> 
> oops, should be:
> 
> egrep '^From [-a-za-z0-9@[-a-za-z0-9]+\.[a-za-z0-9]+ [A-Z][a-z]{2} 
> [A-Z][a-z]{2} [ 1-3][0-9] [0-2][0-9]:[0-5][0-9]:[0-5][0-9] [0-9]{4}$' mbox | 
> wc -l
> 
> But you might be fine with:
> 
> grep '^From ' mbox | wc -l

Thanks, but that's the one part that I want to solve... I'm not familiar with sh
script, the script I use for maildir is the follows:

mailhier=~/.mutt/mails

if [ $(find $mailhier -type f -print | wc -l) -ne 0 ]; then
for d in "$mailhier/"*
do
if [ $(find "$d" -type f -print | wc -l) -eq 0 ]; then
rm -r "$d"
fi
done
fi

I don't know how to do the same thing in sh script for mbox? Any one can figure
me out of it?

Thank you.

-- 
Hi,
Wu, Yue


How to count new emails in mbox format mailbox?

2009-12-24 Thread Wu, Yue
Hi list:

Now I've changed to mbox from maildir, when with maildir, I use a sh script to
count the number of mails in directory new/ of each of my mails/ sub-directory,
but now I don't know how to achieve it with mbox, any hint will be appreciated.

-- 
Hi,
Wu, Yue


Re: Is it safe to use mbox?

2009-12-24 Thread Wu, Yue
On Wed, Dec 23, 2009 at 01:41:14PM -0600, Derek Martin wrote:
> On Wed, Dec 23, 2009 at 10:17:57AM -0600, Kyle Wheeler wrote:
> > Now, I'm assuming that you're storing your mbox locally on a standard 
> > unix filesystem rather than on an NFS-mount or on an MS-DOS partition 
> > or something similarly weird. 
> 
> Does mbox have issues on MS-DOS partitions?  I wasn't aware of any
> (though you need to be careful about using mixed case).  I was aware
> that maildir does, because on MS filesystems, you can't use ':' in a
> path.

[]

Thanks for useful explanations :)

-- 
Hi,
Wu, Yue


Re: How to match multi-charactors?

2009-12-13 Thread Wu, Yue
On Sat, Dec 12, 2009 at 07:36:50PM +0800, Chuangliu wrote:
> On Tue, Dec 08, 2009 at 07:39:44PM +0800, Wu, Yue wrote:
> > how to let mutt match the messages whose message body contents some
> > particular multi-charactors?
> 
> You can try this:
> 
> set thorough_search=yes
> 
> That would make the body and headers be decoded before searching.By this
> way you can search for non-ASCII characters in mutt.

Exactly, thank you!

-- 
Hi,
Wu, Yue


How to match multi-charactors?

2009-12-08 Thread Wu, Yue
Hi, list:

I'm trying to limit the messages with the key binding l then =b foo, but I find
"foo" must be English, multi-charactor can't match any messages, so my question
is how to let mutt match the messages whose message body contents some
particular multi-charactors?

-- 
Hi,
Wu, Yue


Re: Terminal for mutt (Poll)

2009-10-08 Thread Wu, Yue
On Thu, Oct 08, 2009 at 03:30:47AM -0400, James Michael Fultz wrote:
> 
> Dark background, light text.  Usually light gray on black.  I'm
> currently using the Rxvt color scheme for GNOME Terminal.  Was
> previously using Tango but found to be too... subdued.  The Rxvt color
> scheme has a crisp appearance to me.  Linux console would be my second
> choice of color scheme.  I've used a similar color schema when using
> Konsole as well.

How to set bg/fg for xterm so that the color is the exact same with which for
console(the real console, not x terminal)? I find console has the beautiful font
displaying and soft seeing fg/bg effect, don't know how to set it for xterm to
the same.  (I have to use x terminal for Chinese showing.)

-- 
Hi,
Wu, Yue


Re: Offical site's uncomplete manual.txt and broken manual.txt.gz

2009-09-25 Thread Wu, Yue
On Fri, Sep 25, 2009 at 01:57:45AM -0400, James Michael Fultz wrote:
> * "Wu, Yue"  [2009-09-25 13:22 +0800]:
> [ ... ]
> > Hi James,
> > 
> > I've tried `col -b` and `col -bp`, both produce errors and stop immatiatly.
> > 
> > y...@bsd ~ > cat manual.txt | col -b -p
> > 
> >9.14. Default editor Function Bindings
> > 
> >col: Illegal byte sequence
> 
> Curious.  While the '-p' option to col may not be a cure-all for
> dealing with unsupported character sets, I don't see any such
> character at that location either.  Looking at a hexdump of that
> section of the manual, aside from the embedded backspace
> characters, it appears to be ASCII.
> 
> Perhaps your copy of the manual is still yet corrupted?  Here are
> the MD5 checksums for the files I have downloaded.
> 
> dff620858d4aa4d9df7b46a02ede482b  manual.txt
> 832c15a5325130eaa5d81d038e373aaa  manual.txt.gz
> 
> 'manual.txt' being a decompressed copy of the downloaded
> 'manual.txt.gz'.

y...@bsd ~ > md5 manual.txt.gz
MD5 (manual.txt.gz) = 832c15a5325130eaa5d81d038e373aaa
y...@bsd ~ > md5 manual.txt
MD5 (manual.txt) = dff620858d4aa4d9df7b46a02ede482b
y...@bsd ~ > cat manual.txt | col -b -p
[...omitted most parts]
   9.14. Default editor Function Bindings

   col: Illegal byte sequence
  List_of_Examplesy

using col -b without -p produces the same error.

Still want to say, if manual.txt.gzip isn't a real plain text, it should be
renamed to a more proper and clear name. And please put a full version of
manual.txt[http://www.mutt.org/doc/devel/manual.txt] on the offical website.

What do you think?

-- 
Hi,
Wu, Yue


Re: Offical site's uncomplete manual.txt and broken manual.txt.gz

2009-09-24 Thread Wu, Yue
On Thu, Sep 24, 2009 at 10:40:15PM -0400, James Michael Fultz wrote:
> 
> There's an explanation to be found in less' man page and Mutt's
> manual.
> 
> <http://www.mutt.org/doc/manual/manual-2.html#ss2.3>
> 
> "Also, the internal pager supports a couple other advanced
> features. For one, it will accept and translate the ``standard''
> nroff sequences for bold and underline. These sequences are a
> series of either the letter, backspace (^H), the letter again for
> bold or the letter, backspace, ``_'' for denoting underline. ..."
> 
> You can convert those sequences to regular text using col with
> its '-b' option.  Due to some versions of col's inability to
> handle UTF-8, the '-p' option may be necessary as well.

Hi James,

I've tried `col -b` and `col -bp`, both produce errors and stop immatiatly.

y...@bsd ~ > cat manual.txt | col -b -p

   9.14. Default editor Function Bindings

   col: Illegal byte sequence

-- 
Hi,
Wu, Yue


Re: How to remove empty maildir?

2009-09-24 Thread Wu, Yue
On Thu, Sep 24, 2009 at 11:57:38AM -0500, Derek Martin wrote:
> On Thu, Sep 24, 2009 at 02:59:30PM +0800, Wu, Yue wrote:
> > I got some idea about handling the empty maildirs in mutt. Mutt should use 
> > some
> > method to check if the maildir is empty or not, if so, then mutt can mask 
> > the
> > empty ones automatically, so I can be away the no sense the boring empty
> > maildirs and also don't need to worry about if the rmdir's solution is 
> > reliable
> > or not.
> 
> I wonder where you got that idea from... ;-)
> 
>   http://www.mail-archive.com/mutt-users@mutt.org/msg39155.html

What a pity I can't reach the website... Could you show me the contents of
archived mails please?


-- 
Hi,
Wu, Yue


Re: Offical site's uncomplete manual.txt and broken manual.txt.gz

2009-09-24 Thread Wu, Yue
On Thu, Sep 24, 2009 at 03:20:39PM +0200, Joost Kremers wrote:
> On Thu, Sep 24, 2009 at 03:12:53PM +0200, Michael Wagner wrote:
> > * Wu, Yue  24.09.2009
> > > y...@bsd ~/gtd/stuff > gzip -tv manual.txt.gz
> > > gzip: manual.txt.gz: not in gzip format
> > > manual.txt.gz:NOT OK
> > 
> > I don't understand it. Here is all ok.
> 
> I've seen it happen before that a browser silently unzips a file it downloads
> but doesn't bother to change the file ending.

Thanks for pointing me out of it, gzipped file issue has gone.

When I use

fetch http://www.mutt.org/doc/devel/manual.txt.gz

the file is ok(fetch is a wget-like app in FreeBSD).

> 
> Wu, try the `file' command on manual.txt.gz. If it says 'ASCII Text', then the
> file was decompressed.

Maybe opera does some suck thing on the gzipped file it
downloads:

y...@bsd ~ > file manual.txt.gz
manual.txt.gz: ISO-8859 English text, with overstriking

Don't know what's wrong with opera :(

Also, I don't know how to view the file as a plain text, when I try to view it
by vim, the garbage charactors full-filled with my screen.

`less` is ok. Maybe the file contains many control sequences that vim can't
recorgnize but `less` can? If so, then I think it should be renamed to
manual.less or other thing to make it clear.

-- 
Hi,
Wu, Yue


Re: Offical site's uncomplete manual.txt and broken manual.txt.gz

2009-09-24 Thread Wu, Yue
On Wed, Sep 23, 2009 at 06:09:38PM +0200, Michael Wagner wrote:
> * Wu, Yue  23.09.2009
> > In mutt offical site, the documentation for devel version:
> > 
> > text version: http://www.mutt.org/doc/devel/manual.txt
> > 
> > is an uncompleted version, which just give a table of contents and the first
> > chapter.
> > 
> > text gzipped version: http://www.mutt.org/doc/devel/manual.txt.gz
> > 
> > isn't a gzipped version actually, I can't gunzip with it.
> 
> Hello Wu,
> 
> the version at http://www.mutt.org/doc/devel/manual.txt.gz is a gzipped 
> file. I've downloaded it for testing and everything is allright with the 
> it. Also when I visited the side with different text browsers, they 
> showed me all the correct file.
> 
> What browser do you use?

I'm using opera 10.0 for FreeBSD.

y...@bsd ~/gtd/stuff > gzip -tv manual.txt.gz
gzip: manual.txt.gz: not in gzip format
manual.txt.gz:NOT OK

y...@bsd ~/gtd/stuff > gzip --version
FreeBSD gzip 20090621

I'm curious why not just use `tar jcvf manul.txt.bz2 manual.txt`?

-- 
Hi,
Wu, Yue


Re: How to remove empty maildir?

2009-09-24 Thread Wu, Yue
On Thu, Sep 24, 2009 at 08:26:53AM +0200, Christian Ebert wrote:
> 
> But I would be careful with rm while developing the script, perhaps do a
> 
>  echo $d

I got some idea about handling the empty maildirs in mutt. Mutt should use some
method to check if the maildir is empty or not, if so, then mutt can mask the
empty ones automatically, so I can be away the no sense the boring empty
maildirs and also don't need to worry about if the rmdir's solution is reliable
or not.

-- 
Hi,
Wu, Yue


Re: How to remove empty maildir?

2009-09-23 Thread Wu, Yue
On Thu, Sep 24, 2009 at 08:26:53AM +0200, Christian Ebert wrote:
> * Wu, Yue on Thursday, September 24, 2009 at 09:24:35 +0800
> > 
> > I don't know sh, and I've tried the following sh script, but it doesn't 
> > work:
> > 
> > #!/bin/sh
> > 
> > DIR="~/temp/mails/*"
> > 
> > for d in ${DIR}; do
> >if [ $(find d -type f | wc -l) -eq 0 ] ; then
> >rm -r d
>  
>  rm -r $d
> 
> But I would be careful with rm while developing the script, perhaps do a
> 
>  echo $d

mutt owns the maildir at all, so I don't need to worry it :)

> 
> first, to see what would be removed.
>  
> >fi
> > done
> 
> I also think this does not work with a nested hierarchy. Try this
> for a simple nested hierarchy:
> 
> 
> mailhier="~/temp/mails"
> 
> for md in `find $mailhier -type d \( -name cur -o -name new -o -name tmp 
> -execdir pwd \; \) -prune`; do
> if [ `find "$md" -type f | wc -l` -eq 0 ]; then
> echo "$md"
> # rm -r "$md"
> fi
> done

Thank you, I've take it down in my note for reference. James Michael's version
seems more concise, so I will use that version :)

-- 
Hi,
Wu, Yue


Re: How to remove empty maildir?

2009-09-23 Thread Wu, Yue
On Wed, Sep 23, 2009 at 09:03:09AM -0500, Kyle Wheeler wrote:
> On Wednesday, September 23 at 09:45 PM, quoth Wu, Yue:
> >The logic I need is:
> >
> >if maildir A has no mails(new/ tmp/ cur/ are empty)
> >rm -r A
> >endif
> 
> Ahh. How about:
> 
>  if [ $(find A -type f | wc -l) -eq 0 ] ; then
>  rm -r A
>  fi
> 

Thanks for all replies, mutt uses its own maildir so I have no issue about the
two apps read/write the same maildirs at one time.

I don't know sh, and I've tried the following sh script, but it doesn't work:

#!/bin/sh

DIR="~/temp/mails/*"

for d in ${DIR}; do
if [ $(find d -type f | wc -l) -eq 0 ] ; then
rm -r d
fi
done

It says:

y...@bsd ~ > ./del_maildir.sh
find: d: No such file or directory
rm: d: No such file or directory
y

-- 
Hi,
Wu, Yue


Re: How to remove empty maildir?

2009-09-23 Thread Wu, Yue
On Wed, Sep 23, 2009 at 08:21:35AM -0500, Kyle Wheeler wrote:
> On Wednesday, September 23 at 08:16 PM, quoth Wu, Yue:
> >Hi, list, question is how to use some commands(i.g. shell commands) to remove
> >the empty maildirs, i.e. no any file in maildirs' new/ cur/ and tmp/?
> 
> If you know it won't be re-created or delivered to while you're 
> fussing with it, you can just use `rm -r maildirname` or even `rmdir 
> maildirname/new maildirname/cur maildirname/tmp maildirname`

Maybe I did not describe clearly. I'm sure them won't be re-created while I'm
removing them. I just need a way to determine if a maildir is empty(it should
has the empty new/ tmp/ cur/ respectively), then remove the empty maildir.

`rm -r maildirname` doesn't help me to determine if the maildirname is empty.

`rmdir maildirname/new maildirname/cur maildirname/new maildirname` isn't a rock
way, because if one of a maildir's child dirs(new/ cur/ tmp) is lost, then mutt
won't regonize the maildir mailboxes.

The logic I need is:

if maildir A has no mails(new/ tmp/ cur/ are empty)
rm -r A
endif

-- 
Hi,
Wu, Yue


Offical site's uncomplete manual.txt and broken manual.txt.gz

2009-09-23 Thread Wu, Yue
In mutt offical site, the documentation for devel version:

text version: http://www.mutt.org/doc/devel/manual.txt

is an uncompleted version, which just give a table of contents and the first
chapter.

text gzipped version: http://www.mutt.org/doc/devel/manual.txt.gz

isn't a gzipped version actually, I can't gunzip with it.

-- 
Hi,
Wu, Yue


How to remove empty maildir?

2009-09-23 Thread Wu, Yue
Hi, list, question is how to use some commands(i.g. shell commands) to remove
the empty maildirs, i.e. no any file in maildirs' new/ cur/ and tmp/?

-- 
Hi,
Wu, Yue


Re: Blank html when trying to view html attachment by opera

2009-09-23 Thread Wu, Yue
On Tue, Sep 22, 2009 at 10:33:06PM +0800, Wu, Yue wrote:
> Hi, list,
> 
> I have a weird issue, my mailcap has this entry:
> 
> text/html; opera '%s'; test=test -n "$DISPLAY"
> 
> But I still can't view the html attachment, opera always shows me a blank html
> file. What's wrong?

Hi, I've found the solution:

text/html; opera '%s'; description=HTML Text; test=test -n "$DISPLAY"; 
needsterminal

It works like a charm.

-- 
Hi,
Wu, Yue


Re: Blank html when trying to view html attachment by opera

2009-09-22 Thread Wu, Yue
On Tue, Sep 22, 2009 at 08:06:04AM -0700, Gary Johnson wrote:
> On 2009-09-22, Wu, Yue wrote:
> > Hi, list,
> > 
> > I have a weird issue, my mailcap has this entry:
> > 
> > text/html; opera '%s'; test=test -n "$DISPLAY"
> > 
> > But I still can't view the html attachment, opera always shows me a blank 
> > html
> > file. What's wrong?
> 
> Is opera running in the foreground or in the background?  In other
> words, when opera is attempting to display an attachment, is mutt
> unresponsive to the keyboard or can you still control it?  If opera
> is running in the background so that you can still control mutt
> while opera is running, then the problem is probably that mutt is
> clearing and deleting the file before opera has had a chance to read
> it.  You'll need to either delay mutt's clearing of the file, e.g.,
> by putting a sleep command after opera's invocation, or copy the
> file before starting opera and running opera on the copy.  You can
> find out more here:
> 
> http://www.spocom.com/users/gjohnson/mutt/#background
> 
> A simpler solution would be to have mutt deliver the attachment to
> opera's standard input, if that's possible with opera.

Hi, Gray, I have tried your website with "sleep 5", it doesn't work also :(

opera is running in the background.

-- 
Hi,
Wu, Yue


Re: Blank html when trying to view html attachment by opera

2009-09-22 Thread Wu, Yue
On Tue, Sep 22, 2009 at 09:47:27AM -0500, Kyle Wheeler wrote:
> 
> See the problem? How can mutt know when Opera is done using the file?
> 
> The usual solution is to create a wrapper script that will copy the 
> temporary file somewhere safe. This essentially just avoids mutt's 
> cleanup; so you need to have your own way of managing all the 
> temporary files that will get created.
> 

This way is not so elegant from my view. And actually I have lost my mailcap
file, which has an entry for viewing html by opera, nothing wraaper is needed, I
can't get back it. So I know there is a simple way to do it, but can't remember
it exactly.

So any clue about the solution without wrapper?(Sorry I really can't remember it
at all :()

-- 
Hi,
Wu, Yue


Blank html when trying to view html attachment by opera

2009-09-22 Thread Wu, Yue
Hi, list,

I have a weird issue, my mailcap has this entry:

text/html; opera '%s'; test=test -n "$DISPLAY"

But I still can't view the html attachment, opera always shows me a blank html
file. What's wrong?

-- 
Hi,
Wu, Yue


Re: How to implement save_empty on maildir?

2009-06-21 Thread Wu, Yue
On Sun, Jun 21, 2009 at 08:20:19AM -0400, Paul Hoffman wrote:
> On Sun, Jun 21, 2009 at 10:31:56AM +0100, Chris G wrote:
> > It's one of my major gripes with maildir, there appears to be no way
> > to safely (as in maildirsafely) remove a maildir folder.
> 
> I would move (rename) the root of the maildir; then you can delete cur,
> new, and tmp in any order you like.  Not absolutely foolproof, since you
> might successfully delete (for example) $maildir/new but not
> $maildir/cur, but at least the initial mv should be atomic.
> 
> - cut here -  
> #!/bin/bash
> # Also works in zsh (I think)
> if [ $# != 1 ]; then
> echo "usage: rmmaildir DIR" >&2
> exit 1
> fi
> maildir=$1
> # This should use ${maildir#/} or whatever but I forget the syntax
> parent=${maildir%/*}
> base=${maildir##*/}
> tmp=$parent/.$base.deleting.$$
> if mv $maildir $tmp; then
> if rmdir $tmp/new $tmp/cur $tmp/tmp $tmp; then
> exit 0
> elif ! mkdir -p $tmp/new $tmp/cur $tmp/tmp; then
> echo "Partially deleted" >&2
> exit -1
> fi
> else
> echo "Can't delete" >&2
> exit 2
> fi
> - cut here -  

Thanks for the tip, but I don't like this way, and I haven't bash installed :)

-- 
Hi,
Wu, Yue


Re: How to implement save_empty on maildir?

2009-06-21 Thread Wu, Yue
On Sun, Jun 21, 2009 at 11:11:46PM +0200, Rocco Rutte wrote:
> Hi,
> 
> * Wu, Yue wrote:
> 
> > Why need I to be boring to do that if mutt can do it automatically?
> 
> It cannot safely remove a maildir because it has no way to stop other 
> tools from delivering mail while mutt deletes it. The only one who has 
> the power to stop delivery and do safe removal is the user. The same 
> counts for MH folders.
> 
> Removing empty mbox/mmdf files on the contrary is atomic and can be 
> safely done by mutt.

What about mbox? I have set up fetchmail and procmail fetch mails via cron, so
if I'm operating on mbox like deleting/modifying some mails in mutt, and if
new mails comes now, would some unsafe evens e.g. lost mails happen?

If mbox has no such side effect, then I will be back with mbox.

-- 
Hi,
Wu, Yue


Re: How to implement save_empty on maildir?

2009-06-20 Thread Wu, Yue

On Sat, 20 Jun 2009 21:28:41 +0800, Rocco Rutte  wrote:


Hi,

* Wu, Yue wrote:

But it's annoying all the groups show up in the view all the time, I  
just want

to see the groups that have mails, others should be hiden or deleted.


Why don't you remove them then?

Rocco


Why need I to be boring to do that if mutt can do it automatically?

--
Hi,
Wu, Yue


Re: How to implement save_empty on maildir?

2009-06-19 Thread Wu, Yue
On Fri, Jun 19, 2009 at 02:33:20PM +0200, Rocco Rutte wrote:
> Hi,
> 
> * Wu, Yue wrote:
> > I want to let mutt deletes empty maildirs automatically, but 'save_empty' 
> > only
> > works for mbox, why? How to achieve it for maildir?
> 
> It doesn't work for maildir. I'm not sure why, but probably because
> removing an empty maildir has the potential to break something as it
> cannot be done atomically.
> 
> For example, mutt could try to delete the subdirectories in this order:
> new, cur, tmp. While mutt deletes new/ some other process writes a new
> message into tmp/ which the delivery agent tries to move to new/ which
> isn't there anymore.
> 
> I guess not supporting it is the safest variant.

But it's annoying all the groups show up in the view all the time, I just want
to see the groups that have mails, others should be hiden or deleted.

-- 
Hi,
Wu, Yue


How to implement save_empty on maildir?

2009-06-18 Thread Wu, Yue
I want to let mutt deletes empty maildirs automatically, but 'save_empty' only
works for mbox, why? How to achieve it for maildir?

-- 
Hi,
Wu, Yue


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

2009-05-12 Thread Wu, Yue
On Tue, May 12, 2009 at 09:40:52AM +0200, Rocco Rutte wrote:
> Hi,
> 
> * Wu, Yue wrote:
> 
> > Thank you, 'check_mbox_size' does the trick.
> 
> Hmm, how is the partition with the mboxes mounted? This option only
> exists for setups where access/modification time cannot be reliably used
> to detect new mail. Filesystems can be mounted to not update atime as
> that causes disk updates but provides little to no benefit for most
> applications so many people turn atime updates off.

I have little acknowledge on it, so I can't give you the sure answer, sorry :(

I'm on FreeBSD 7, ~/.mutt is on the /user filesystem, it's mounted by:

> /dev/ad2s2e /usrufs rw  2   2

in the /etc/fstab. I don't know if atime is enabled by default or not.

About the patch you advise, I'm really not familiar with programming relative 
stuff and
got a little busy these days, so I'm afraid I can't have a try, sorry!

-- 
Hi,
Wu, Yue


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

2009-05-11 Thread Wu, Yue
On Mon, May 11, 2009 at 09:49:16AM -0700, Gary Johnson wrote:
> On 2009-05-11, "Wu, Yue"  wrote:
> >
> > Say, I have many mailboxes that have many new messages, but now I have no
> > so
> > much time to see all of them, so I quickly enter mailboxes one by one,
> > then
> > just pick the message I'm got most of interested, leave the remaining
> > messges
> > for viewing them when I have time.  Serveral hours later, I have time, I
> > want
> > to see the new messages that I haven't seen last time, but now, all
> > mailboxes
> > haven't any flags, so I have to go through all of them to see if there are
> > new
> > message in them or not.
>
>
> If that's the behavior you want, any you're using mutt version
> 1.5.15 or newer with mbox-style mailboxes, you might try setting
> 'check_mbox_size' in your muttrc and see if that helps.

Thank you, 'check_mbox_size' does the trick. I don't know how do other mailers
handle the mbox that has new messages, but mutt is the only one that I've met
have this strange behavior like Derek said(I was and am the user of
emacs'gnus, opera's M2, even gmail's web interface hasn't this issue). Maybe
check the mbox that has messages flaged as 'N' is a more rock way?

-- 
Hi,
Wu, Yue


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

2009-05-10 Thread Wu, Yue
On Sat, May 09, 2009 at 12:13:54AM -0400, Chris Jones wrote:
> 
> 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.

Say, I have many mailboxes that have many new messages, but now I have no so
much time to see all of them, so I quickly enter mailboxes one by one, then
just pick the message I'm got most of interested, leave the remaining messges
for viewing them when I have time.  Serveral hours later, I have time, I want
to see the new messages that I haven't seen last time, but now, all mailboxes
haven't any flags, so I have to go through all of them to see if there are new
message in them or not.

-- 
Hi,
Wu, Yue


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

2009-05-09 Thread Wu, Yue
On Sat, May 09, 2009 at 12:13:54AM -0400, Chris Jones wrote:
> 
> 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.

Then an option should be made to fit different user's taste I think, because
from your view, 'mark_old' no need to be exist too.

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


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


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 <http://www.mutt.org/doc/manual/manual-6.html#sort> 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 <http://www.mutt.org/doc/manual/manual-6.html#sort_browser> 
> 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


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: Does alias support multi addresses for one nick?

2009-04-25 Thread Wu, Yue

On Fri, 24 Apr 2009 10:57:11 +0800, Wu, Yue  wrote:


Something like:

   alias wu \"Wu, Yue\" 

It's not so convenient for creating more than one nick for one man.





2) if just multiple addresses

alias nick_1 longname , address_2, adess_3,...,address_n


With this way, when I type nick_1, then mutt will complete all the
mail
adresses for me:

longname , address_2, adess_3,...,address_n

but what I want is a completion candidate menu like this:

longname 
longname 
longname 

--
Hi,
Wu, Yue



Does alias support multi addresses for one nick?

2009-04-23 Thread Wu, Yue

Something like:

  alias wu \"Wu, Yue\" 

It's not so convenient for creating more than one nick for one man.

--
Hi,
Wu, Yue