GNU bug report logs - #61396
diff mode could distinguish changed from deleted lines

Previous Next

Package: emacs;

Reported by: Samuel Wales <samologist <at> gmail.com>

Date: Fri, 10 Feb 2023 03:26:01 UTC

Severity: normal

Full log


Message #26 received at 61396 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Samuel Wales <samologist <at> gmail.com>
Cc: 61396 <at> debbugs.gnu.org, rms <at> gnu.org
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
Date: Sat, 11 Feb 2023 19:54:07 +0200
> 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.




This bug report was last modified 1 year and 318 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.