bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61396: diff mode could distinguish changed from deleted lines


From: Samuel Wales
Subject: bug#61396: diff mode could distinguish changed from deleted lines
Date: Sun, 1 Oct 2023 15:16:20 -0700

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 via email to

[Prev in Thread] Current Thread [Next in Thread]