Re: mutt/2402: damaged regexps in folder-hooks
The following reply was made to PR mutt/2402; it has been noted by GNATS.
From: Rocco Rutte <pdmef@xxxxxxx>
To: bug-any@xxxxxxxxxxxxx
Cc:
Subject: Re: mutt/2402: damaged regexps in folder-hooks
Date: Thu, 3 Aug 2006 10:29:40 +0000
Hi,
* Alain Bench [06-08-03 07:31:38 +0200] wrote:
> In Mutt 1.5.10 and more, the regexp in folder-hooks can
>be damaged in some circumstances, leading to false positive
>matches. That seems to happen when the regexp both: Has
>uppercase characters (is case-significant), and begins by an
>'^' anchor.
I found more cases to not work: case-sensivity doesn't matter (I put
some debug lines in and always see errors for your samples).
The problem is that mailbox expansion is applied to folder-hooks. I'd
call this a feature and thus your report is both valid and invalid at
the same time... :(
Please see: mutt_parse_hook() in hook.c and _mutt_expand_path() in
muttlib.c. The core problem is that '^' is a shortcut for the current
folder and thus is subject to expansion and is not treated as a regex
special character. Basically we need a way to distinct between regex and
"folder" special characters.
Any ideas?
bye, Rocco
--
:wq!