GNU bug report logs - #43702
Emacs master: Incorrect highlighting in regexp isearch.

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Tue, 29 Sep 2020 12:14:01 UTC

Severity: normal

Tags: fixed

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 #20 received at 43702 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Alan Mackenzie <acm <at> muc.de>, 43702 <at> debbugs.gnu.org
Subject: Re: bug#43702: Emacs master: Incorrect highlighting in regexp isearch.
Date: Wed, 30 Sep 2020 22:16:19 +0300
>> 16.  The problem was that the submatch highlight was light magenta on
>> dark magenta, which I just didn't see.  Maybe the colours used for
>> isearch-group-1 on a 16 colour terminal are suboptimal.  They certainly
>> don't work well on my Linux virtual tty.
>
> I've now changed the face specs to inherit from the isearch face if
> there's fewer than 88 colours.

There is another problem: currently isearch-group-3 is indistinguishable
visually from the default isearch face (on X with more than 88 colours).

Also I don't understand why users would need so many faces (9!)

Maybe better to do what Drew proposed: to distinguish the odd groups
from the even groups, i.e. to have only 2 additional faces
(a brighter face like the current isearch-group-1 for the odd groups,
and a darker face for the even groups).

>> However, on pressing backspace to go back to previous matches, this new
>> highlighting is no longer there.
>>
>> So, perhaps there is/are (a) bug(s) here after all, just not the one I
>> thought I'd found.
>
> Yup; I can reproduce that bug.

The problem is that isearch-delete-char doesn't run the search again
that would set match-data.  It just restores an old position
(isearch-other-end and point) that isearch-highlight uses.

One solution is to call isearch-search in isearch-delete-char
before isearch-update.  But I can't predict all dire consequences.

So a better solution is maybe to save match-data on the isearch stack
and restore in isearch-pop-state (called by isearch-delete-char).
I could try to do this.




This bug report was last modified 4 years and 221 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.