From: Dima Kogan <dima@secretsauce.net>
To: Juri Linkov <juri@linkov.net>
Cc: 22541@debbugs.gnu.org
Subject: bug#22541: 25.0.50; highlight-regexp from isearch has is case-sensitive even if case-fold is active
Date: Tue, 26 Apr 2016 22:02:23 -0700 [thread overview]
Message-ID: <87zisfhcf4.fsf@secretsauce.net> (raw)
In-Reply-To: <8760x7vyui.fsf@mail.linkov.net>
Juri Linkov <juri@linkov.net> writes:
>> This is an offshoot of #22520:
>>
>> Juri Linkov wrote:
>>
>>> > 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 :)
> 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?
Thanks
dima
next prev parent reply other threads:[~2016-04-27 5:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-03 6:29 bug#22541: 25.0.50; highlight-regexp from isearch has is case-sensitive even if case-fold is active Dima Kogan
2016-03-01 0:14 ` Juri Linkov
2016-04-27 5:02 ` Dima Kogan [this message]
2016-04-30 20:07 ` Juri Linkov
2020-05-21 23:23 ` Juri Linkov
2017-04-22 12:31 ` Tino Calancha
2017-04-23 23:18 ` Juri Linkov
2017-04-25 5:22 ` Tino Calancha
2017-04-25 20:52 ` Juri Linkov
2017-04-27 14:22 ` Tino Calancha
2017-05-09 22:10 ` Juri Linkov
2017-05-24 13:35 ` Tino Calancha
2017-05-25 12:11 ` Tino Calancha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zisfhcf4.fsf@secretsauce.net \
--to=dima@secretsauce.net \
--cc=22541@debbugs.gnu.org \
--cc=juri@linkov.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.