emacs-devel
[Top][All Lists]
Advanced

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

Re: Recent diff-mode changes feel slow with TRAMP


From: Juri Linkov
Subject: Re: Recent diff-mode changes feel slow with TRAMP
Date: Sat, 19 Jan 2019 23:04:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>> 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.



reply via email to

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