[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#46396: 27.1.90; Ediff's non-focused diff section, background too lig
From: |
Matt Armstrong |
Subject: |
bug#46396: 27.1.90; Ediff's non-focused diff section, background too light in --reverse |
Date: |
Tue, 09 Feb 2021 23:24:35 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin) |
Matt Armstrong <matt@rfc20.org> writes:
> bug-gnu-emacs_at_gnu.org@tangential.info writes:
>
>> I created a file a.txt with foo\n\nbar\n\nbaz\n and a file b.txt with
>> foo0\n\nbar\n\nbaz1\n.
>>
>> I open these files with "emacs -Q --reverse a.txt b.txt", and run M-x
>> ediff-buffers RET for the two corresponding buffers.
>>
>> If I press n or p to traverse the diff sections, the diff section in focus
>> is readable, but the unfocused sections have a white background, in other
>> words, the contrast seems too low. The unfocused sections are fine without
>> the --reverse option.
[...]
> I can confirm that the colors look bad on my system as well. The problem
> does not seem confined to use of --reverse-video. They look bad if I set
> the theme to a dark theme through "M-x customize-theme". For example,
> the "deeper-blue" and "tango-dark" themes tickle the same problem. I
> suspect any theme that sets the foreground color to a light color will
> exhibit this.
>
> I notice that one of the bad looking diff faces is `ediff-even-diff-A',
> which, on any system with >88 colors, the face fails to specify a
> foreground color. Most ediff-* faces are like this.
>
> I wonder if faces should always set foreground/background colors in
> pairs?
>
> Anyway, when I expressly set the foreground colors for these faces to
> black, they look fine in dark themes.
On the theory that not setting both foreground and background in a face
is the problem here, I went to see how we ended up in the situation.
The origin of the faces without a foreground setting is commit
382ceb2cdbedc06b06d9fb424d83f531339a3311 by Juri Linkov <juri@jurta.org>
while working on https://debbugs.gnu.org/cgi/bugreport.cgi?bug=10181.
I've cc'd him here. Juri, can you comment?
I'm especially interested to hear your thoughts on why the change made
things nicer (what you said in
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=10181#84). It seems like a
user's theme can place the foreground color anywhere between white and
black, so specifying *only* the background color will have some risk
landing on a bad combination.
Or, perhaps the ediff faces should vary the background based on
(background light) and (background dark)?
- bug#46396: 27.1.90; Ediff's non-focused diff section, background too light in --reverse, bug-gnu-emacs_at_gnu . org, 2021/02/09
- bug#46396: 27.1.90; Ediff's non-focused diff section, background too light in --reverse, Matt Armstrong, 2021/02/10
- bug#46396: 27.1.90; Ediff's non-focused diff section, background too light in --reverse,
Matt Armstrong <=
- bug#46396: 27.1.90; Ediff's non-focused diff section, background too light in --reverse, Juri Linkov, 2021/02/10
- bug#46396: 27.1.90; Ediff's non-focused diff section, background too light in --reverse, Matt Armstrong, 2021/02/10
- bug#46396: 27.1.90; Ediff's non-focused diff section, background too light in --reverse, Juri Linkov, 2021/02/10
- bug#46396: 27.1.90; Ediff's non-focused diff section, background too light in --reverse, Matt Armstrong, 2021/02/10