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

From: Dmitry Gutov <[email-masked]>
Date: Wed, 13 Sep 2023 01:31:21 +0300

On 13/09/2023 01:11, Stefan Monnier via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
>> - First, `diff -u` (contrary to `diff -c`) does not distinguish between
>>    `removed/added` and `modified` lines.   And `diff-mode` currently inherits
>>    this weakness.  I think there's a good case to be made for
>>    highlighting the "truly added" and "truly removed" lines differently
>>    from those that are modified.
>>    I'd argue that a "logical" choice would be to highlight them the same
>>    way as those parts highlighted by `diff-refine-hunk`
>>    (i.e. `diff-refine-removed` and `diff-refine-added`) since that's how
>>    refinement would highlight them if we were to ask it to.
> The patch below does that for the case of unified diffs.
> I kind of like the result.
> It's not quite ready for prime time, but I'd be interested to hear what
> other people think about it.

Not quite ready indeed: the new option is unused (implied to be t, I guess).

Just a single piece of feedback: I get where the idea is coming from 
(and it's good in theory), but I'm not loving the added bright spots of 
color where there previously were just toned down lighter backgrounds.

If it were indicated differently somehow (though I'm not sure how), 
perhaps I'd like it more. As it is, though, the added value (quite minor 
since it's easy to see which hunk is "pure addition" already) doesn't 
seem to balance out the inconvenience.