GNU bug report logs - #60338
[PATCH] Add option to present server changes as diffs

Previous Next

Package: emacs;

Reported by: Philip Kaludercic <philipk <at> posteo.net>

Date: Mon, 26 Dec 2022 13:43:02 UTC

Severity: normal

Tags: patch

Done: João Távora <joaotavora <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #94 received at 60338-done <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: João Távora <joaotavora <at> gmail.com>,
 Eshel Yaron <me <at> eshelyaron.com>
Cc: Philip Kaludercic <philipk <at> posteo.net>, Eli Zaretskii <eliz <at> gnu.org>,
 60338-done <at> debbugs.gnu.org
Subject: Re: bug#60338: [PATCH] Add option to present server changes as diffs
Date: Thu, 7 Sep 2023 04:00:33 +0300
On 02/09/2023 12:55, João Távora wrote:
> Anyway I invite everyone to have a look and try to improve it, perhaps
> moving it out of Eglot into the shiny new "refactoring interface" if
> those ever become a thing.

Regarding the diff approach vs. "shiny new", I've run a little 
comparison with VS Code: doing a rename of 'glyph_row' across the Emacs 
codebase (a moderately sized project) takes about ~1.44s to produce the 
diff.

VS Code's "Refactor Preview" takes about 1/3rd of that time to show. I'm 
guessing that's because it just paints whatever the language server 
returns instead of doing a bunch of process calls. If that is the case, 
one of the approaches seems to have a fundamental performance advantage.

Not to belittle the new addition, though - it's a good step for Eglot.

Two other thoughts after trying it:

- I would probably want to bind the originally proposed 
'diff-apply-everything' to 'C-c C-c' (e.g. "commit the change to disk"), 
but that's already taken in diff-mode.

- 'git diff' has a less-frequently used option called '--word-diff' 
which could reduce the length of the diff in the case I am testing (but 
I guess diff-mode would have to be updated to support that output). And 
another way in that direction would be to reduce the size of the diff 
context (e.g. to 0).




This bug report was last modified 1 year and 316 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.