all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Matt Armstrong <matt@rfc20.org>
To: 46396@debbugs.gnu.org, bug-gnu-emacs_at_gnu.org@tangential.info,
	Juri Linkov <juri@jurta.org>
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	[thread overview]
Message-ID: <m2czx8idvw.fsf@matts-mbp-2016.lan> (raw)
In-Reply-To: <m2zh0cifni.fsf@matts-mbp-2016.lan> (Matt Armstrong's message of "Tue, 09 Feb 2021 22:46:25 -0800")

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)?





  reply	other threads:[~2021-02-10  7:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-09  9:19 bug#46396: 27.1.90; Ediff's non-focused diff section, background too light in --reverse bug-gnu-emacs_at_gnu.org
2021-02-10  6:46 ` Matt Armstrong
2021-02-10  7:24   ` Matt Armstrong [this message]
2021-02-10 17:01     ` Juri Linkov
2021-02-10 18:24       ` Matt Armstrong
2021-02-10 19:39         ` Juri Linkov
2021-02-10 20:28           ` Matt Armstrong

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2czx8idvw.fsf@matts-mbp-2016.lan \
    --to=matt@rfc20.org \
    --cc=46396@debbugs.gnu.org \
    --cc=bug-gnu-emacs_at_gnu.org@tangential.info \
    --cc=juri@jurta.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.