From: Juri Linkov <juri@linkov.net>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Alan Mackenzie <acm@muc.de>, 43702@debbugs.gnu.org
Subject: bug#43702: Emacs master: Incorrect highlighting in regexp isearch.
Date: Wed, 30 Sep 2020 22:16:19 +0300 [thread overview]
Message-ID: <87y2krdqsk.fsf@mail.linkov.net> (raw)
In-Reply-To: <87y2ks819k.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 30 Sep 2020 04:08:23 +0200")
>> 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.
next prev parent reply other threads:[~2020-09-30 19:16 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-29 12:13 bug#43702: Emacs master: Incorrect highlighting in regexp isearch Alan Mackenzie
2020-09-29 14:43 ` Eli Zaretskii
2020-09-29 15:33 ` Alan Mackenzie
2020-09-29 16:07 ` Eli Zaretskii
2020-09-30 2:08 ` Lars Ingebrigtsen
2020-09-30 19:16 ` Juri Linkov [this message]
2020-09-30 21:28 ` Drew Adams
2020-10-01 19:11 ` Juri Linkov
2020-10-01 19:38 ` Drew Adams
2020-10-01 22:41 ` Drew Adams
2020-10-06 20:01 ` Juri Linkov
2020-10-06 22:40 ` Drew Adams
2020-10-07 8:13 ` Juri Linkov
2020-10-07 15:42 ` Drew Adams
2020-10-12 19:59 ` Juri Linkov
2020-10-12 23:07 ` Drew Adams
2020-10-13 20:14 ` Juri Linkov
2020-10-13 20:54 ` Drew Adams
2020-10-14 8:57 ` Juri Linkov
2020-10-14 17:03 ` Drew Adams
2020-10-07 7:16 ` Eli Zaretskii
2020-10-07 8:09 ` Juri Linkov
2020-10-07 9:14 ` Eli Zaretskii
2020-10-07 19:09 ` Juri Linkov
2020-10-07 20:02 ` Drew Adams
2020-10-07 20:22 ` Juri Linkov
2020-10-07 20:56 ` Drew Adams
2020-10-01 1:12 ` Lars Ingebrigtsen
2020-10-01 19:20 ` Juri Linkov
2020-10-01 19:23 ` Lars Ingebrigtsen
2020-10-01 19:26 ` Eli Zaretskii
2020-10-01 19:39 ` Drew Adams
2020-10-02 6:57 ` Juri Linkov
2020-10-06 20:17 ` Juri Linkov
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y2krdqsk.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=43702@debbugs.gnu.org \
--cc=acm@muc.de \
--cc=larsi@gnus.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).