GNU bug report logs -
#43702
Emacs master: Incorrect highlighting in regexp isearch.
Previous Next
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
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
> As I mentioned, it's simple to just repeat the use
> of the same 8 faces, for 9-16, 17-24, etc.
This is a very good idea. Now this is implemented in isearch.
> I've added a third screenshot, where I did this:
> recycle the faces of groups 1-5 for groups 9-13.
Yes, recycling is nice, this is what now is used in isearch.
> The foreground for each group is apparently taken
> from the foreground of face `isearch'. I guess I
> hadn't paid attention to that. I think that's
> unfortunate, in general. I probably didn't notice
> it because in my own setup I've customized face
> `isearch' to use a black foreground (and a green
> background).
>
> I think the default foreground for face `isearch'
> should be something that works well with each of
> the default group faces, and that's not likely to
> be `lightskyblue1'. Change it to `black' and the
> regexp group highlighting is quite good. You need
> to be able to see the text that the regexp parts
> apply to.
>
> I also tried just removing a foreground spec from
> the vanilla default for face `isearch'. In the
> case shown, which is *scratch*, the text has face
> `font-lock-comment-face'. And if face `isearch'
> doesn't have a good foreground spec (e.g. `black')
> then the result isn't great. (But at least it's
> better than with foreground `lightskyblue1'.)
>
> As I've just noticed this problem now, and as I
> don't want to impose any default change on face
> `isearch' in my code, I've now changed the default
> regexp group faces to each specify a `black'
> foreground (instead of no foreground), for a light
> background mode.
You see? So many problems when you tried to design
a color palette for many isearch faces.
I suppose you agree that the previous color palette in isearch
with a color gradient is not suitable for highlighting of group matches
because while looking at highlighted matches it's quite impossible to
say which color corresponds to which group number.
I meant when colors looks like a heatmap, for example:
[heatmap.png (image/png, inline)]
[Message part 3 (text/plain, inline)]
would anyone be able to say a number while looking at a color?
I see that you are using more distinct colors,
but still these colors are bleak.
Other examples of color scheme are in re-builder and hi-lock faces.
Personally, I'd like to use rainbow colors in own customization:
[rainbow.png (image/png, inline)]
[Message part 5 (text/plain, inline)]
But frankly speaking such color palette looks like angry fruit salad.
What is the most reasonable thing to do is to delegate the decision
about the color scheme selection to theme authors and to user customization.
So now isearch provides two distinct recycling colors based on the default
isearch color scheme.
> The third screenshot (which recycles faces 1-5 for
> 9-13) shows this: a black foreground for each face
> used for the current search hit (but not for lazy
> highlighting).
Recycling is now implemented in isearch.
Thanks for the idea.
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.