From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#61396: diff mode could distinguish changed from deleted lines Date: Sat, 11 Feb 2023 19:54:07 +0200 Organization: LINKOV.NET Message-ID: <86y1p4m9cg.fsf@mail.linkov.net> 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="23202"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 61396@debbugs.gnu.org, rms@gnu.org To: Samuel Wales Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 11 18:57:19 2023 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 1pQu7j-0005wI-3Q for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 Feb 2023 18:57:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQu7V-0001WB-PK; Sat, 11 Feb 2023 12:57:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQu7T-0001Ub-10 for bug-gnu-emacs@gnu.org; Sat, 11 Feb 2023 12:57:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pQu7S-0006nW-JM for bug-gnu-emacs@gnu.org; Sat, 11 Feb 2023 12:57:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pQu7S-0006IK-AJ for bug-gnu-emacs@gnu.org; Sat, 11 Feb 2023 12:57:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Feb 2023 17:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61396 X-GNU-PR-Package: emacs Original-Received: via spool by 61396-submit@debbugs.gnu.org id=B61396.167613819324151 (code B ref 61396); Sat, 11 Feb 2023 17:57:02 +0000 Original-Received: (at 61396) by debbugs.gnu.org; 11 Feb 2023 17:56:33 +0000 Original-Received: from localhost ([127.0.0.1]:43148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQu6z-0006HT-FN for submit@debbugs.gnu.org; Sat, 11 Feb 2023 12:56:33 -0500 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]:44873) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQu6w-0006HA-Ll for 61396@debbugs.gnu.org; Sat, 11 Feb 2023 12:56:32 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 23E19FF804; Sat, 11 Feb 2023 17:56:22 +0000 (UTC) In-Reply-To: (Samuel Wales's message of "Fri, 10 Feb 2023 22:07:24 -0700") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255340 Archived-At: > i think it is in diff-mode in emacs, at least when it is displaying diff -u. > > in particular, the idea is whether it can be solved using emacs > features such as faces. > > it is true that diff and friends can often do colors, but to my > knowledge, diff-mode uses raw text as its input. But diff has no color for changed lines, only for added/removed lines: '--palette=PALETTE' Specify what color palette to use when colored output is enabled. It defaults to 'rs=0:hd=1:ad=32:de=31:ln=36' for red deleted lines, green added lines, cyan line numbers, bold header. Supported capabilities are as follows. 'ad=32' SGR substring for added lines. The default is green foreground. 'de=31' SGR substring for deleted lines. The default is red foreground. 'hd=1' SGR substring for chunk header. The default is bold foreground. 'ln=36' SGR substring for line numbers. The default is cyan foreground.