From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#33567: Syntactic fontification of diff hunks Date: Wed, 19 Dec 2018 00:35:36 +0200 Organization: LINKOV.NET Message-ID: <874lba1n0n.fsf@mail.linkov.net> References: <878t18j4is.fsf@mail.linkov.net> <83a7lobemr.fsf@gnu.org> <87a7lnv6ex.fsf@mail.linkov.net> <83pnuj9kb8.fsf@gnu.org> <875zwajh6c.fsf@mail.linkov.net> <837egpagko.fsf@gnu.org> <87k1koygvm.fsf@mail.linkov.net> <83r2ew8mfx.fsf@gnu.org> <87va475y1m.fsf@mail.linkov.net> <87mupafi73.fsf@mail.linkov.net> <834lbgh3n7.fsf@gnu.org> <87h8fduis0.fsf@mail.linkov.net> <83d0q0dtc0.fsf@gnu.org> <877eg7sq8a.fsf@mail.linkov.net> <47546098-59ef-ae43-878a-fd225b60ec99@yandex.ru> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1545172688 15662 195.159.176.226 (18 Dec 2018 22:38:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 18 Dec 2018 22:38:08 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 33567@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 18 23:38:04 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZO03-0003xh-3H for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Dec 2018 23:38:03 +0100 Original-Received: from localhost ([::1]:56585 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZO27-0001XY-9A for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Dec 2018 17:40:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56956) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZO21-0001XH-LC for bug-gnu-emacs@gnu.org; Tue, 18 Dec 2018 17:40:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZO1x-0007rg-VC for bug-gnu-emacs@gnu.org; Tue, 18 Dec 2018 17:40:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49586) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gZO1x-0007rK-Ns for bug-gnu-emacs@gnu.org; Tue, 18 Dec 2018 17:40:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gZO1x-0001M5-Jv for bug-gnu-emacs@gnu.org; Tue, 18 Dec 2018 17:40:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Dec 2018 22:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33567 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 33567-submit@debbugs.gnu.org id=B33567.15451727905185 (code B ref 33567); Tue, 18 Dec 2018 22:40:01 +0000 Original-Received: (at 33567) by debbugs.gnu.org; 18 Dec 2018 22:39:50 +0000 Original-Received: from localhost ([127.0.0.1]:53844 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZO1l-0001LY-Tt for submit@debbugs.gnu.org; Tue, 18 Dec 2018 17:39:50 -0500 Original-Received: from common.maple.relay.mailchannels.net ([23.83.214.38]:13750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZO1j-0001LP-1t for 33567@debbugs.gnu.org; Tue, 18 Dec 2018 17:39:47 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 7AED75027DF; Tue, 18 Dec 2018 22:39:45 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a38.g.dreamhost.com (unknown [100.96.30.62]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 444F45024E1; Tue, 18 Dec 2018 22:39:45 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a38.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.2); Tue, 18 Dec 2018 22:39:45 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Drop-Soft: 23e1b198748668f5_1545172785361_1492432131 X-MC-Loop-Signature: 1545172785361:3822229077 X-MC-Ingress-Time: 1545172785360 Original-Received: from pdx1-sub0-mail-a38.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a38.g.dreamhost.com (Postfix) with ESMTP id E357E81DDC; Tue, 18 Dec 2018 14:39:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=rfxjTPCLG40pKOz5e66bob3/WZ8=; b= rrbs5uPVwGLjJBrYMFVa7/hnXv2zlShrJKcJtDBSeDBLxG1/9zpsslsqlb7/48Zq Z5422uz9OGxh2AM5vwRdB33jwK/YOYJJqxnJjCypcIqeNUmx6HT+yon7HXzzHqB3 GppFgUgXQKVx/m+71buTf8ES6M8qI+Ag+pZnkh4hp3I= Original-Received: from mail.jurta.org (m91-129-96-177.cust.tele2.ee [91.129.96.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a38.g.dreamhost.com (Postfix) with ESMTPSA id 6980E81DDB; Tue, 18 Dec 2018 14:39:42 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a38 In-Reply-To: <47546098-59ef-ae43-878a-fd225b60ec99@yandex.ru> (Dmitry Gutov's message of "Tue, 18 Dec 2018 17:55:15 +0200") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrudeikedguddufecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledrleeirddujeejnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledrleeirddujeejpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepughguhhtohhvseihrghnuggvgidrrhhunecuvehluhhsthgvrhfuihiivgeptd X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:153580 Archived-At: > Have you considered bringing over the "default" face foregrounds as well, > though, not just the special highlighting? > > My brain sees syntax highlighting in some places and keeps wanting to > interpret the green and red text and something syntactically meaningful > as well. > > Maybe we could add extra ancestors for diff-added and diff-removed faces, > with default foregrounds, and use them for the base highlighting of diff > chunks, aside from +'s and -'s. > > Another thing that messes up the display a bit, is that comments and > docstrings also have customized backgrounds in my theme, but that's less > essential and seems harder to fix. I tried to replicate your settings: in emacs -Q I change the default foreground with e.g. M-x set-foreground-color RET A side note: M-x set-foreground-color RET TAB shows a list of colors with different backgrounds, not foregrounds as it would be natural to expect, so it is difficult to decide what foreground color to select by looking at background colors. This needs a separate bug#. Ok, let's say I chose M-x set-foreground-color RET LightSeaGreen Now in diff-mode I see exactly the same fontification with the same foreground colors and as seen in the original buffer visited from diff-mode by `C-c C-c', plus red/green background added by diff-mode.