Re: How to implement save_empty on maildir?

2009-07-06 Thread Rocco Rutte
Hi, * Derek Martin wrote: > Personally, I'm a proponent of the idea that the interface should be > consistent regardless of the folder formats; I'd prefer that the > feature either be removed or emulated where it doesn't actually work. Agreed, I've started: http://dev.mutt.org/trac/wiki

Re: How to implement save_empty on maildir?

2009-07-06 Thread Derek Martin
On Fri, Jul 03, 2009 at 01:45:50PM +0200, Rocco Rutte wrote: > This an example to outline a proposed solution, I know, but how about > mkdtemp()? Hard-coded temporary file/directory names beg for trouble. Sure, if you were going to try to implement something like this, mkdtemp is the right place t

Re: How to implement save_empty on maildir?

2009-07-03 Thread Rocco Rutte
Hi, * Derek Martin wrote: > On Thu, Jul 02, 2009 at 08:10:21AM +, Jörg Sommer wrote: > > So, create the directory yourself to ensure it's there and yours. > > > > % cat rename-test.c > > #include > > #include > > > > int main(void) > > { > > mkdir("mdir-mutt-delete", 0) /* this is a

Re: How to implement save_empty on maildir?

2009-07-02 Thread Derek Martin
Hi Jörg, On Thu, Jul 02, 2009 at 08:10:21AM +, Jörg Sommer wrote: > So, create the directory yourself to ensure it's there and yours. > > % cat rename-test.c > #include > #include > > int main(void) > { > mkdir("mdir-mutt-delete", 0) /* this is a temporary directory to >

Re: How to implement save_empty on maildir?

2009-07-02 Thread Jörg Sommer
Hallo Derek, Derek Martin wrote: > On Sun, Jun 28, 2009 at 07:42:53PM +, Jörg Sommer wrote: >> Rocco Rutte wrote: >> > * 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? >> > >

Re: How to implement save_empty on maildir?

2009-06-28 Thread Derek Martin
On Sun, Jun 28, 2009 at 07:42:53PM +, Jörg Sommer wrote: > Hi, > > Rocco Rutte wrote: > > * 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'

Re: How to implement save_empty on maildir?

2009-06-28 Thread Jörg Sommer
Hi, Rocco Rutte wrote: > * 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 potent

Re: How to implement save_empty on maildir?

2009-06-21 Thread Michael Tatge
* On Mon, Jun 22, 2009 06:21AM +0800 Wu, Yue (vano...@gmail.com) muttered: > On Sun, Jun 21, 2009 at 11:11:46PM +0200, Rocco Rutte wrote: > > 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 fetc

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 m

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 onl

Re: How to implement save_empty on maildir?

2009-06-21 Thread Rocco Rutte
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. Th

Re: How to implement save_empty on maildir?

2009-06-21 Thread Paul Hoffman
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. No

Re: How to implement save_empty on maildir?

2009-06-21 Thread Chris G
On Sat, Jun 20, 2009 at 06:43:52AM +0800, Wu, Yue wrote: > 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 mail

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 borin

Re: How to implement save_empty on maildir?

2009-06-20 Thread Rocco Rutte
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

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 b

Re: How to implement save_empty on maildir?

2009-06-19 Thread Rocco Rutte
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 cann

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