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-24 Thread Ionel Mugurel Ciobica
On 24-09-2009, at 09h 24'35", Wu, Yue wrote about "Re: How to remove empty 
maildir?"
> 
> #!/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
> 

#!/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



Ionel


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: Offical site's uncomplete manual.txt and broken manual.txt.gz

2009-09-24 Thread Michael Wagner
* Wu, Yue  24.09.2009
> On Wed, Sep 23, 2009 at 06:09:38PM +0200, Michael Wagner wrote:
 
> > 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`?

Hello Wu,

I don't understand it. Here is all ok.

mich...@workstation tty2:~$ wget http://www.mutt.org/doc/devel/manual.txt.gz

mich...@workstation tty2:~$ file manual.txt.gz 
manual.txt.gz: gzip compressed data, was "manual.txt", from Unix,
last modified: Sun Jul  5 00:12:55 2009, max compression

mich...@workstation tty2:~$ gzip -tv manual.txt.gz
manual.txt.gz:   OK

Is it possible that 'opera' does an offending download? Download it one 
more time with 'wget' and look what happen. Sorry, when this will give 
you not the correct file, I have no idea what to do more. But I can send 
you the manual with email. Write to me, if you want it this way.

Michael

-- 
"Nowhere you can be that isn't where you were meant to be. It's easy."
   -- John Lennon


signature.asc
Description: Digital signature


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

2009-09-24 Thread Joost Kremers
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.

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


-- 
Joost Kremers
Life has its moments


Re: How to remove empty maildir?

2009-09-24 Thread Derek Martin
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

-- 
Derek D. Martinhttp://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.



pgpX2gBf6Jner.pgp
Description: PGP signature


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: 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 James Michael Fultz
* "Wu, Yue"  [2009-09-25 07:49 +0800]:
[ ... ]
> 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.

There's an explanation to be found in less' man page and Mutt's
manual.



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


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.
> 
> 
> 
> "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: Offical site's uncomplete manual.txt and broken manual.txt.gz

2009-09-24 Thread James Michael Fultz
* "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'.