From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matt Armstrong Newsgroups: gmane.emacs.bugs 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 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22197"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin) To: 46396@debbugs.gnu.org, bug-gnu-emacs_at_gnu.org@tangential.info, Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 10 08:25:12 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l9js6-0005ZP-Vf for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Feb 2021 08:25:10 +0100 Original-Received: from localhost ([::1]:57192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9js5-0003sK-Eg for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Feb 2021 02:25:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56640) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9jry-0003s7-PH for bug-gnu-emacs@gnu.org; Wed, 10 Feb 2021 02:25:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43819) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l9jrx-0004RX-On for bug-gnu-emacs@gnu.org; Wed, 10 Feb 2021 02:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l9jrx-0003RT-Lv for bug-gnu-emacs@gnu.org; Wed, 10 Feb 2021 02:25:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Matt Armstrong Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Feb 2021 07:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46396 X-GNU-PR-Package: emacs Original-Received: via spool by 46396-submit@debbugs.gnu.org id=B46396.161294189113211 (code B ref 46396); Wed, 10 Feb 2021 07:25:01 +0000 Original-Received: (at 46396) by debbugs.gnu.org; 10 Feb 2021 07:24:51 +0000 Original-Received: from localhost ([127.0.0.1]:55365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9jrm-0003R1-Ql for submit@debbugs.gnu.org; Wed, 10 Feb 2021 02:24:51 -0500 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:34277) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9jrj-0003Ql-Ik for 46396@debbugs.gnu.org; Wed, 10 Feb 2021 02:24:49 -0500 X-Originating-IP: 24.113.169.116 Original-Received: from matts-mbp-2016.lan (24-113-169-116.wavecable.com [24.113.169.116]) (Authenticated sender: matt@rfc20.org) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 2A25220003; Wed, 10 Feb 2021 07:24:38 +0000 (UTC) In-Reply-To: (Matt Armstrong's message of "Tue, 09 Feb 2021 22:46:25 -0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:199760 Archived-At: Matt Armstrong 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 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)?