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 #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Samuel Wales <samologist <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: diff mode could distinguish changed from deleted lines
Date: Thu, 9 Feb 2023 20:25:25 -0700
in diff mode, with diff -u, if a line in A was added to
in B, you can't tell by looking at the A version whether it was
=deleted= in B or =changed= from A to B.  you have to
manually find it in B and then compare.  here is an example:

  -now is the time
  +now is the time FOR ALL GOOD MEN

the - line is in del face.  there is no indication on that
line that the line is not deleted.

if the lines are separated sufficiently, it is not obvious
to the user whether it is a line that was deleted, or, as
above, added to.  the del face is therefore ambiguous and can be
potentially misleading to the user.

===

the only thing that tells you non-confusingly that A was
changed, or where, is if you look at B.

this is not practical when there are many lines.

a fix is to have a different face for changed lines.  i
suggest a muted bg face.  another fix is to stick a colored
marker INDICATOR in A where changes in B exist.

  -now is the time^
  +now is the time FOR ALL GOOD MEN

where ^ is a colored marker -- actually just a changed bg
for the newline in this case would work, but i don't think
emacs supports that.

thank you.

-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com




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.