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 22:46:25 -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="20761"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin) To: 46396@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 10 07:47:16 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 1l9jHP-0005DX-26 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Feb 2021 07:47:15 +0100 Original-Received: from localhost ([::1]:40554 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9jHO-0003Zd-0a for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Feb 2021 01:47:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50270) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9jHC-0003Z9-Ca for bug-gnu-emacs@gnu.org; Wed, 10 Feb 2021 01:47:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43795) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l9jHC-0008EW-4C for bug-gnu-emacs@gnu.org; Wed, 10 Feb 2021 01:47:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l9jHC-0002Wh-1i for bug-gnu-emacs@gnu.org; Wed, 10 Feb 2021 01:47:02 -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 06:47:02 +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.16129395999677 (code B ref 46396); Wed, 10 Feb 2021 06:47:02 +0000 Original-Received: (at 46396) by debbugs.gnu.org; 10 Feb 2021 06:46:39 +0000 Original-Received: from localhost ([127.0.0.1]:55341 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9jGo-0002W1-Q6 for submit@debbugs.gnu.org; Wed, 10 Feb 2021 01:46:39 -0500 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]:58101) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9jGl-0002Vn-Ux for 46396@debbugs.gnu.org; Wed, 10 Feb 2021 01:46:37 -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 relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 6FE7DFF807 for <46396@debbugs.gnu.org>; Wed, 10 Feb 2021 06:46:27 +0000 (UTC) In-Reply-To: (bug-gnu-emacs at gnu's message of "Tue, 09 Feb 2021 01:19:43 -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:199759 Archived-At: 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. > > Aside: Similar to --reverse, I have been using (invert-face 'default) for a > simple dark theme in emacs. I can get a similar result in terminal emacs > with "(setq frame-background-mode 'dark) (mapc 'frame-set-background-mode > (frame-list))". These approaches to a simple dark theme came up in > discussions on #emacs. > > I encountered the issue above, as I was using magit, with (invert-face > 'default), and pressed `e` on a commit, wanting to view the diff in the > side-by-side view. > > Thank you, > -Brady > > Data from M-x report-emacs-bug RET below: > > In GNU Emacs 27.1.90 (build 1, x86_64-apple-darwin19.6.0, NS appkit-1894.60 Version 10.15.7 (Build 19H2)) > of 2021-01-15 built on clay.local > Repository revision: 488204cdc64b6a130042ecc64d59c4538287b81d > Repository branch: emacs-27 > Windowing system distributor 'Apple', version 10.3.1894 > System Description: Mac OS X 10.15.7 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.