[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22541: 25.0.50; highlight-regexp from isearch has is case-sensitive

From: Dima Kogan
Subject: bug#22541: 25.0.50; highlight-regexp from isearch has is case-sensitive even if case-fold is active
Date: Tue, 02 Feb 2016 22:29:22 -0800

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.

This is true! And it's really weird... The user expectation is that if
we highlight something (M-s h r) directly from isearch, then at least
the thing isearch was finding would be highlighted, and here this
doesn't happen. So a slightly simpler example is:

0: Let the buffer have the string Ab
1: put the point on A
2: C-s
3: C-w (to isearch the whole thing)
4: M-s h r enter

Then Ab isn't found because we defaulted to char-folding, and the regex was


This clearly has no case-folding active on top of the char-folding. But
the isearch had both, so the regex should get both. This would make the
regex twice as long, but it would be right, at least.

If we turn off char-folding (but leave case-folding alone; on) by adding
a step

2.5: M-s '

then the regex we get is


which clearly has the case-folding, and works the way we expect.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]