GNU bug report logs - #22541
25.0.50; highlight-regexp from isearch is case-sensitive even if case-fold is active

Previous Next

Package: emacs;

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


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Tino Calancha <tino.calancha <at> gmail.com>
Cc: 22541 <at> debbugs.gnu.org, Dima Kogan <dima <at> secretsauce.net>
Subject: bug#22541: 25.0.50; highlight-regexp from isearch has is case-sensitive even if case-fold is active
Date: Wed, 10 May 2017 01:10:03 +0300
>>> @@ -1950,7 +1950,12 @@ isearch-highlight-regexp
>>>  			      (regexp-quote s))))
>>>  			isearch-string ""))
>>>  		      (t (regexp-quote isearch-string)))))
>>> -    (hi-lock-face-buffer regexp (hi-lock-read-face-name)))
>>> +    (hi-lock-face-buffer regexp (hi-lock-read-face-name)
>>> +                         (if (and (eq isearch-case-fold-search t)
>>> +                                  search-upper-case)
>>> +                             (isearch-no-upper-case-p
>>> +                              isearch-string isearch-regexp)
>>> +                           isearch-case-fold-search)))
>>>    (and isearch-recursive-edit (exit-recursive-edit)))
>>
>> If this works reliably, then we could remove that ugly hack
>> from ‘isearch-highlight-regexp’, I mean the one with the comment
>> “Turn isearch-string into a case-insensitive regexp”.
> That's right.  We don't need such trick here anymore.  But this hack
> turned ut to be useful in hi-lock.el.
>
> The new patch, in addition to fix this bug report, it also
> helps with the 5. in bug#22520, that is:
> emacs -Q
> M-s hr t RET RET ; Highlight with regexp "[Tt]"
> M-s hu t RET ; Unhighlight the buffer.

Thanks, could you find more test cases that still don't work?




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.