Hi,

* Dan Boger [05/31/02 14:34:37 CEST] wrote:
> On Fri, May 31, 2002 at 02:27:09PM +0200, Rocco Rutte wrote:
> > I have a problem with a folder-hook. Say, I've got three
> > folders IN.back1, IN.back2 and IN.test. If I want to take
> > some action for all folders except IN.back1 I use:

> >   folder-hook =IN\.[^b][^a][^c][^k][^1] ...

> > The problem is that mutt doesn't apply it to IN.test. I
> > guess that for IN.test it checks if the first 5 characters
> > after IN. are not one of b,a,c,k,1 - but 'test' is only 4
> > long. I guess that's the reason why it fails in this special
> > case while it works for all other folder names longer or
> > equal to 5 characters after IN..

> sounds to me that it's doing exactly what you told it to...  match any
> folder that begins with an "IN.", followed by 5 chars that are not (in
> order) "b" "a" "c" "k" "1" - and you're right - since "test" is only 4
> characters, it doesn't match the "not 1" section.

Yeah, that's what I was afraid of. Actually, I was somehow
missing the fact that it checks for an existing character
while 'not 1' is true for just nothing - but it's not a
character. [^1] thus is true if a) there's a character and
b) that character is not 1. If you don't understand the way
I thought...  doesn't matter: You're right.

> I think you might be better off making a general folder hook (that will
> match back1 as well), then adding another folder hook (after?  before?)
> that will deal with the special case.

It don't need even more lines in my setup. I think it should
be not too difficult to write a pattern doing what I want -
now that I'm aware of the small difference.

Thanks anyways...

Cheers, Rocco

Reply via email to