unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Samuel Wales <samologist@gmail.com>
To: Juri Linkov <juri@linkov.net>
Cc: Dmitry Gutov <dmitry@gutov.dev>,
	61396@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#61396: diff mode could distinguish changed from deleted lines
Date: Sun, 1 Oct 2023 15:16:20 -0700	[thread overview]
Message-ID: <CAJcAo8sPJS4ELzDTs8ZAwb1QfxDR1Kc69zD7o7K64KOOr-W4Vg@mail.gmail.com> (raw)
In-Reply-To: <864jja5evx.fsf@mail.linkov.net>

some lines are truly added or deleted.  the problem is they look
exactly like lines that are changed in the other polarity.  so you
can't tell which they are.
i don't think it's too heavy to indicate such lines by e.g. inverse
video on the polarity character -+ or so.  others might.


On 10/1/23, Juri Linkov <juri@linkov.net> wrote:
>>>> I have been bitten several times in the past when going through largish
>>>> diffs where I overlooked important things in the added/removed parts
>>>> because they were colored the same was as the unchanged parts of
>>>> changed lines and so I just glossed over them.
>>>
>>> I realized now the same problem exists even without color highlighting
>>> at all.
>>
>> No, the problem I describe is specific to the "refined" diff
>> highlighting: I rely on this highlighting to tell me what has "really"
>> been changed, yet it's not applied to lines that are "just added" or
>> "just removed" so I end up skipping over them unwittingly because they
>> are highlighted identically to the *unchanged* parts of those lines
>> which are otherwise changed.
>
> AFAICS, GitHub tries to address this problem by using less refining:
> only changes inside a single line are refined.  I don't like this,
> but maybe such an option could help at least by not promising that
> all added/removed text is using the refined diff highlighting.
>
> On the other extreme, your option `diff-refine-nonmodified`
> could consistently highlight all added/removed text,
> but such highlighting is too "heavy".
>
> So a new option could be like font-lock levels,
> and we need to find a balance for the default value.
>


-- 
The Kafka Pandemic

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





  reply	other threads:[~2023-10-01 22:16 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-10  3:25 bug#61396: diff mode could distinguish changed from deleted lines Samuel Wales
2023-02-10  7:17 ` Juri Linkov
2023-02-10 23:49   ` Samuel Wales
2023-02-10 23:50     ` Samuel Wales
2023-02-10 13:58 ` Dmitry Gutov
2023-02-11  4:25 ` Richard Stallman
2023-02-11  5:07   ` Samuel Wales
2023-02-11 17:54     ` Juri Linkov
2023-02-12  0:52       ` Samuel Wales
2023-02-12  1:04         ` Dmitry Gutov
2023-02-12  1:07           ` Samuel Wales
2023-02-12  1:52             ` Dmitry Gutov
2023-02-12  2:12               ` Samuel Wales
2023-02-12  2:17                 ` Dmitry Gutov
2023-02-12  2:54                   ` Samuel Wales
2023-02-12  8:31         ` Juri Linkov
2023-02-12  9:03           ` Samuel Wales
2023-02-12 17:20             ` Juri Linkov
2023-02-12 22:16               ` Samuel Wales
2023-02-12 22:48                 ` Samuel Wales
2023-07-23  6:04                   ` Samuel Wales
2023-07-24 10:21                     ` Robert Pluim
2023-07-24 23:38                       ` Samuel Wales
2023-07-24 23:39                         ` Samuel Wales
2023-07-25  8:11                           ` Robert Pluim
2023-07-25 21:29                             ` Samuel Wales
2023-08-10 23:56                     ` Samuel Wales
2023-08-11  0:41                       ` Dmitry Gutov
2023-09-03 17:29                     ` Juri Linkov
2023-03-08 21:14 ` Samuel Wales
2023-09-04 21:06 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-04 22:38   ` Samuel Wales
2023-09-07  2:34     ` Samuel Wales
2023-09-12 22:11   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-12 22:31     ` Dmitry Gutov
2023-09-13 14:51       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-14  6:05         ` Samuel Wales
2023-09-14 22:42         ` Dmitry Gutov
2023-09-15  1:34           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-15  1:58             ` Samuel Wales
2023-09-15 10:20             ` Dmitry Gutov
2023-09-30 17:38         ` Juri Linkov
2023-09-30 18:18           ` Eli Zaretskii
2023-10-01  6:32             ` Juri Linkov
2023-10-01 15:54           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-01 18:53             ` Juri Linkov
2023-10-01 22:16               ` Samuel Wales [this message]
2023-10-02  6:48                 ` Juri Linkov
2023-10-02 16:56   ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJcAo8sPJS4ELzDTs8ZAwb1QfxDR1Kc69zD7o7K64KOOr-W4Vg@mail.gmail.com \
    --to=samologist@gmail.com \
    --cc=61396@debbugs.gnu.org \
    --cc=dmitry@gutov.dev \
    --cc=juri@linkov.net \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).