<<< Date Index >>>     <<< Thread Index >>>

Re: mutt/2402: damaged regexps in folder-hooks



The following reply was made to PR mutt/2402; it has been noted by GNATS.

From: Brendan Cully <brendan@xxxxxxxxxx>
To: bug-any@xxxxxxxxxxxxx
Cc: 
Subject: Re: mutt/2402: damaged regexps in folder-hooks
Date: Thu, 3 Aug 2006 09:34:57 -0700

 On Thursday, 03 August 2006 at 17:45, Rocco Rutte wrote:
 > 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 15:36:03 +0000
 > 
 >  Hi,
 >  
 >  * Alain Bench [06-08-03 17:15:01 +0200] wrote:
 >  
 >  >     <brainstorming> Is there really a problem outside of "^"? Other
 >  > shortcuts are "! > < - !! ~ = + @". All of them expand only when in
 >  > first position.
 >  
 >  Right.
 >  
 >  >     Otherwise: Why are they expanded if backslashed? They don't need to
 >  > (outside of ! because of ! negation)? "^a" could be expanded to
 >  > "/tmp/nomatchABCa", but "\^a" to "^a" regexp. Hum... One backslash is
 >  > stripped too early, right?
 >  
 >  Yepp: already when reading/tokenizing the line.
 >  
 >  >     They are not expanded if double\\ed. One backslash reaches the
 >  > regexp engine. This doesn't hurt normal chars, but of course hurts "^".
 >  > Grrr...
 >  
 >  So you tried it, too? :)
 >  
 >  Another idea: we simply rename '^' to something else and announce that 
 >  with big fat warnings. We can continue to support '^' except for when 
 >  _mutt_expand_path() get's a regexp. That would add an extra 'case' label 
 >  as well as a check for the rx parameter.
 
 I think this is the only sensible thing to do. Let's use '.' instead
 :)
 
 I don't think '^' has been in use long enough to warrant
 backward-compatibility hacks.