From: Dmitry Gutov <dmitry@gutov.dev>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 61396@debbugs.gnu.org, Samuel Wales <samologist@gmail.com>
Subject: bug#61396: diff mode could distinguish changed from deleted lines
Date: Fri, 15 Sep 2023 01:42:45 +0300 [thread overview]
Message-ID: <aa23388f-1802-0d17-d106-56ce9a5a0eb2@gutov.dev> (raw)
In-Reply-To: <jwvr0n2jfm9.fsf-monnier+emacs@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 3321 bytes --]
On 13/09/2023 17:51, Stefan Monnier wrote:
>> Not quite ready indeed: the new option is unused (implied to be t, I guess).
>
> Oops :-)
> This said, it's not its only problem: the name of that var sucks as well.
>
>> 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.
>
> Yeah, I'm unsure about that. I'm also somewhat annoyed by the extra
> attention it brings to those "boring" additions and removals, but I'm
> wondering if it's really because I want them to look more dull or if
> it's just because of habit.
My view on this, is it's good to have decent contrast of foreground to
background, more-or-less constant across the program's UI. The bright
spots are kind of annoying because of the color calling for attention,
but it also lowers the said contrast.
When the syntactic fontification of hunks was added (bug#33567) we went
through a couple of rounds of toning down the existing backgrounds, so
that they are less in-your-face, while still easy to discern. Simply
dropping the -refine- faces on top of those would not just counter-act
that change, but go in reverse.
> 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 don't remember being bit by this myself, but it does sound like a problem.
>> 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.
>
> Yeah, maybe I'd prefer colors that are halfway between
> `diff-added/removed` and `diff-refine-added/removed`?
> [ Wish we had dynamically-computed face colors for that. ]
Toning the -refine- faces down could be an option. It'll be a balance
between making them less in-your-face and harder to notice overall
(example: diff-refine-added-ddffdd.png).
Some other possibilities:
- In this refinement mode, toning down the "base" backgrounds instead,
while using the current colors for -refine- faces. This is probably a
dead end, though: the distance until white is too small, not enough to
find a good contrast (example: diff-added-f9fff9.png). Might as well use
white or diff-context grey, I guess.
- Like Samuel mentioned, attenuate the indicators' column. Except
instead of inverse video just apply the refine faces? See
diff-refine-indicators.png. Looks good to me color-wise, though the
change in the indication method is somewhat an inconsistency.
- Use some added border around the hunk in green/red (using the color of
diff-indicator-*). Possibly combined with the previous item. The
drawback is the same, and in addition this might not work on the
terminal (?). See diff-define-borders.png; these line were done using
overline/underline so there was no way to make it thicker, but there
must be other methods, e.g. like we do the separator line when writing
the commit message (although that one will create a vertical offset).
[-- Attachment #2: diff-refine-added-ddffdd.png --]
[-- Type: image/png, Size: 189465 bytes --]
[-- Attachment #3: diff-added-f9fff9.png --]
[-- Type: image/png, Size: 186309 bytes --]
[-- Attachment #4: diff-refine-indicators.png --]
[-- Type: image/png, Size: 192024 bytes --]
[-- Attachment #5: diff-refine-borders.png --]
[-- Type: image/png, Size: 194002 bytes --]
next prev parent reply other threads:[~2023-09-14 22:42 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 [this message]
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
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=aa23388f-1802-0d17-d106-56ce9a5a0eb2@gutov.dev \
--to=dmitry@gutov.dev \
--cc=61396@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=samologist@gmail.com \
/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).