From: Juri Linkov <juri@linkov.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Recent diff-mode changes feel slow with TRAMP
Date: Sat, 19 Jan 2019 23:04:14 +0200 [thread overview]
Message-ID: <87h8e4idd9.fsf@mail.linkov.net> (raw)
In-Reply-To: <jwvpnszsywi.fsf-monnier+gmane.emacs.devel@gnu.org> (Stefan Monnier's message of "Sun, 13 Jan 2019 22:31:35 -0500")
>> When a remote host is fast, it's a big advantage that TRAMP supports
>> this feature without any efforts. But when a remote host is slow,
>> it should be disabled indeed.
>>
>> I can't confirm what effect is has on slow connections because all my
>> remote connections are so fast that I don't notice any difference
>> between remote and local.
>
> Do you think it would be possible to provide a fast/local option for
> diff-font-lock-syntax which doesn't fetch the base file but still
> performs some syntax-highlighting (e.g. just take the hunk's text into
> a temp buffer, put it in the appropriate major mode and
> call font-lock-ensure;
There is already an option `hunk-only' but I don't know how
TRAMP could detect a slow connection and set diff-font-lock-syntax
to `hunk-only' in this case.
> maybe bailing out if the end of the hunk is
> taken to be within a string, in which case maybe the whole highlighting
> was done wrong because maybe it was the beginning of the hunk which was
> inside a string)?
Also I don't know how to detect a partial string because if there are
two unterminated strings (i.e. two quotes) in the same hunk
they might be interpreted as one "inside-out" string.
next prev parent reply other threads:[~2019-01-19 21:04 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 [this message]
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
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=87h8e4idd9.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=emacs-devel@gnu.org \
--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 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.