From: Juri Linkov <juri@linkov.net>
To: Dima Kogan <lists@dima.secretsauce.net>
Cc: emacs-devel@gnu.org
Subject: Re: Recent diff-mode changes feel slow with TRAMP
Date: Sat, 19 Jan 2019 23:07:28 +0200 [thread overview]
Message-ID: <877ef0gxv3.fsf@mail.linkov.net> (raw)
In-Reply-To: <87ef9f6cdt.fsf@dima.secretsauce.net> (Dima Kogan's message of "Sun, 13 Jan 2019 21:23:26 -0800")
> OK. Yes. Setting diff-font-lock-syntax to nil makes it fast again.
> Thanks a lot for pointing me to that.
>
> The docs for diff-font-lock-syntax say that 'hunk-only is the fastest
> setting here, but that's not true, right? Isn't nil the fastest one?
`hunk-only' is the fastest non-nil option.
> For my use cases, I don't think I want this enabled at all, TRAMP or
> not. Combined with refinement, this makes the diffs more difficult to
> interpret, at least to me. And even without TRAMP, this makes it slower.
> Do we really want both refinement and this font-locking enabled by
> default?
Modern version control systems like GitHub and GitLab enable both by default.
> There's also a visual issue with auto-refinement. If I load a patch file
> with 'emacs -Q -rv' (no user settings, but reverse video), it looks like
> this:
>
> http://notes.secretsauce.net/emacsdiff.png
>
> Note that the bright green refined face makes the leading + invisible.
> There's an identical problem with the bright red making the leading -
> invisible.
It's easy to improve auto-refinement to not put highlighting on diff
indicators like it's already implemented in line-based diff-font-lock-syntax.
BTW, there is another issue that could be improved in auto-refinement:
when changes are only in whitespace it highlights nothing because it's
word-based. I think in this case it could fall back to the default mode
that doesn't ignore differences in whitespace, thus highlighting whitespace.
prev parent reply other threads:[~2019-01-19 21:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-12 4:16 Recent diff-mode changes feel slow with TRAMP Dima Kogan
2019-01-12 6:57 ` Dima Kogan
2019-01-12 14:44 ` Charles A. Roelli
2019-01-12 19:48 ` Dima Kogan
2019-01-13 20:06 ` Charles A. Roelli
2019-01-13 14:40 ` Charles A. Roelli
2019-01-13 21:23 ` Juri Linkov
2019-01-14 3:31 ` Stefan Monnier
2019-01-19 21:04 ` Juri Linkov
2019-01-20 14:38 ` Stefan Monnier
2019-01-14 3:57 ` Dima Kogan
2019-01-14 5:23 ` Dima Kogan
2019-01-19 21:07 ` Juri Linkov [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877ef0gxv3.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=emacs-devel@gnu.org \
--cc=lists@dima.secretsauce.net \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.