Re: [PATCH] Mailbox Aliases

2009-06-18 Thread Bertrand Janin
Rocco Rutte wrote : > * Bertrand Janin wrote: > > Here is the new patch adding the 'mbalias' command instead of updating > > the 'mailboxes' syntax, it feels a lot cleaner and allows the following: > > > > mbalias somewhere imaps://user:passw...@imap.myhost.com/Somewhere/ > > mbalias local

Re: [PATCH] Mailbox Aliases

2009-06-18 Thread Rocco Rutte
Hi, * Bertrand Janin wrote: > Here is the new patch adding the 'mbalias' command instead of updating > the 'mailboxes' syntax, it feels a lot cleaner and allows the following: > > mbalias somewhere imaps://user:passw...@imap.myhost.com/Somewhere/ > mbalias localstuff =projects/x/archive

Re: [PATCH] Mailbox Aliases

2009-06-17 Thread Bertrand Janin
Aron Griffis wrote : > Bertrand Janin wrote: [Wed Jun 17 2009, 02:32:01PM EDT] > > At first sight, I thought a new command would require a redundant URL > > definition to watch and alias: > > > > mailboxes imaps://user:passw...@imap.myhost.com/Somewhere/ > > mbalias somewhere imaps://user

Re: [PATCH] Mailbox Aliases

2009-06-17 Thread Rocco Rutte
Hi, * Bertrand Janin wrote: > Yes, this would break. I'm not sure why someone would use '!!=foo' as a > parameter to 'mailboxes' though ;) You wrongly assume all config lines mutt gets are intentional the way they are. :) Typos for example can occur. With: mailboxes !=foo a user could actua

Re: [PATCH] Mailbox Aliases

2009-06-17 Thread Aron Griffis
Bertrand Janin wrote: [Wed Jun 17 2009, 02:32:01PM EDT] > At first sight, I thought a new command would require a redundant URL > definition to watch and alias: > > mailboxes imaps://user:passw...@imap.myhost.com/Somewhere/ > mbalias somewhere imaps://user:passw...@imap.myhost.com/Somewhe

Re: [PATCH] Mailbox Aliases

2009-06-17 Thread Bertrand Janin
Aron Griffis wrote : > Bertrand Janin wrote: [Tue Jun 16 2009, 11:48:30PM EDT] > > This small patch allows the following syntax when > > defining mailboxes: > > > > mailboxes js=imaps://u...@myhost.com/ > > mailboxes errors=imaps://ot...@stuff.com/ > > mailboxes longpath=+work/project

Re: [PATCH] Mailbox Aliases

2009-06-17 Thread Aron Griffis
Bertrand Janin wrote: [Tue Jun 16 2009, 11:48:30PM EDT] > This small patch allows the following syntax when > defining mailboxes: > > mailboxes js=imaps://u...@myhost.com/ > mailboxes errors=imaps://ot...@stuff.com/ > mailboxes longpath=+work/project/x/errors/critical I think this is

Re: [PATCH] Mailbox Aliases

2009-06-17 Thread Bertrand Janin
Rocco Rutte wrote : > * Kyle Wheeler wrote: > > On Wednesday, June 17 at 05:28 PM, quoth Rocco Rutte: > > > >>This would appear to break situations like mine, where I use '=' to > > >>refer to $folder: > > > >>mailboxes = =friends =mutt > > > >No, because mutt_expand_path() is called in adva

Re: [PATCH] Mailbox Aliases

2009-06-17 Thread Bertrand Janin
Rocco Rutte wrote : > Mutt has quite a few library functions, so please use them. Especially > safe_malloc() and the strfcpy() macro. Also see mutt_substrdup(). [...] > I also think you should check that *buf != '=' in case of typos like: > > mailboxes ==foo [...] Thank you for looking at i

Re: [PATCH] Mailbox Aliases

2009-06-17 Thread Rocco Rutte
Hi, * Kyle Wheeler wrote: > On Wednesday, June 17 at 05:28 PM, quoth Rocco Rutte: > >>This would appear to break situations like mine, where I use '=' to > >>refer to $folder: > >>mailboxes = =friends =mutt > >No, because mutt_expand_path() is called in advance that would expand a > >leadin

Re: [PATCH] Mailbox Aliases

2009-06-17 Thread Kyle Wheeler
On Wednesday, June 17 at 05:28 PM, quoth Rocco Rutte: This would appear to break situations like mine, where I use '=' to refer to $folder: mailboxes = =friends =mutt No, because mutt_expand_path() is called in advance that would expand a leading '=' using $folder. However, ==foo is kind

Re: [PATCH] Mailbox Aliases

2009-06-17 Thread Rocco Rutte
Hi, * Kyle Wheeler wrote: > This would appear to break situations like mine, where I use '=' to > refer to $folder: > mailboxes = =friends =mutt No, because mutt_expand_path() is called in advance that would expand a leading '=' using $folder. However, ==foo is kind of broken. Rocco

Re: [PATCH] Mailbox Aliases

2009-06-17 Thread Rocco Rutte
Hi, * Bertrand Janin wrote: [...] > diff -r d213f3acdb68 buffy.c > --- a/buffy.c Mon Jun 15 14:24:27 2009 -0700 > +++ b/buffy.c Tue Jun 16 23:04:04 2009 -0400 > +/* Strip out alias for later */ > +if ((p = strchr(buf, '=')) != NULL) > +{ > + len = p - buf; > + alias = mall

Re: [PATCH] Mailbox Aliases

2009-06-17 Thread Bertrand Janin
Kyle Wheeler wrote : > This would appear to break situations like mine, where I use '=' to > refer to $folder: > > mailboxes = =friends =mutt I use '=' myself, but because the first '=' is never used for alias match this line should not break. Bertrand

Re: [PATCH] Mailbox Aliases

2009-06-17 Thread Kyle Wheeler
On Tuesday, June 16 at 11:48 PM, quoth Bertrand Janin: Hi list, I'm a big fan of 'c' to quickly switch between mail boxes but I have to admit that my few IMAP/POP accounts are hard to reach. I know there are a few workarounds to simulate aliases but I thought I'd try a less redundant solution. T

[PATCH] Mailbox Aliases

2009-06-16 Thread Bertrand Janin
Hi list, I'm a big fan of 'c' to quickly switch between mail boxes but I have to admit that my few IMAP/POP accounts are hard to reach. I know there are a few workarounds to simulate aliases but I thought I'd try a less redundant solution. This small patch allows the following syntax when defining