Subject: bug#43702: Emacs master: Incorrect highlighting in regexp isearch.

From: Alan Mackenzie <[email-masked]>
Date: Tue, 29 Sep 2020 15:33:55 +0000

Hello, Eli.

On Tue, Sep 29, 2020 at 17:43:35 +0300, Eli Zaretskii wrote:
> > Date: Tue, 29 Sep 2020 12:13:17 +0000
> > From: Alan Mackenzie <[email-masked]>
> > Cc: [email-masked]

> > In the Emacs master branch
> > (i) emacs -Q
> > (ii) C-x C-f emacs/src/syntax.c<CR>
> > (iii) C-M-s \(inc\|dec\)_both
> > (iv) Press C-s a few times.

> > Notice that the highlighting of the found match has the purple
> > background over the correct characters, but the characters displayed in
> > the foreground are "   _both".  This incorrect display is a bug.

> Here, I don't see any incorrect display, I see a new feature at work.
> If you don't like it, set search-highlight-submatches to nil.

Ah.  I wasn't aware of this new feature.

> How many colors do you have on the terminal where you see the problem?

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.

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.

Thanks.

-- 
Alan Mackenzie (Nuremberg, Germany).