GNU bug report logs -
#22541
25.0.50; highlight-regexp from isearch is case-sensitive even if case-fold is active
Previous Next
Reported by: Dima Kogan <dima <at> secretsauce.net>
Date: Wed, 3 Feb 2016 06:30:02 UTC
Severity: normal
Tags: fixed
Found in version 25.0.50
Fixed in version 28.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #16 received at 22541 <at> debbugs.gnu.org (full text, mbox):
>>>> > Another possible side effect of this is that highlighting
>>>> >
>>>> > Database directory:
>>>> >
>>>> > doesn't work: hi-lock goes through the motions but nothing ends up being
>>>> > highlighted. Turning off char-folding fixes that.
>>>>
>>>> Actually “Database directory:” is not highlighted due to case-folding.
>>>> After toggling case-folding with ‘M-s c’ and preserving the capital D,
>>>> it's highlighted correctly.
>>>>
>>>> ......
>>
>> The problem is that with introduction of char-folding, a hack responsible
>> for case-folding in isearch-highlight-regexp that turns isearch-string
>> into a case-insensitive regexp is not used anymore, i.e. it's overridden by
>> isearch-regexp-function. (Also note a FIXME comment in hi-lock-process-phrase)
>>
>> Since we can't change the value of font-lock-keywords-case-fold-search
>> for font-lock based highlighting in hi-lock for individual regexps,
>> the best solution is to rely on the feature allowing MATCHER in
>> font-lock-keywords to be a function. So we can let-bind case-fold-search
>> in its lambda.
>>
>> Now the remaining problem is how to transfer case-fold from
>> isearch-highlight-regexp down to hi-lock-set-pattern.
>
> Hi. Sorry it took me so long to reply to this. I haven't looked at
> isearch specifically in enough detail to comment on this, but if it
> makes this better, then I'm all for it :)
Fortunately, I'll have more time in May to help in fixing this.
>> Implementing pcre-style embedded modifiers is a good long-term goal,
>> but we need to fix this for the next release. What options do we have now?
>> I see no other way than adding new argument to the chain of calls:
>> ...
>
> I've been looking long-term, and emacs-devel now has a thread about an
> initial implementation of one of the embedded modifiers. Since char-fold
> isn't the default anymore, maybe this issue isn't pressing and isn't
> critical to fix by emacs-25?
Better to release emacs-25 with less bugs :)
This bug report was last modified 5 years and 4 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.