From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#60338: [PATCH] Add option to present server changes as diffs Date: Thu, 7 Sep 2023 04:00:33 +0300 Message-ID: References: <87ilhy1dub.fsf@posteo.net> <877cs97kgb.fsf@posteo.net> <83jzw8yjv5.fsf@gnu.org> <877cs8g8oy.fsf@posteo.net> <83fs6wyhak.fsf@gnu.org> <87y1koerm6.fsf@posteo.net> <83bkhkyeze.fsf@gnu.org> <87v8fr6o86.fsf@posteo.net> <87zg52e12n.fsf@posteo.net> <871qi9q9uc.fsf@posteo.net> <87a5ww7qa3.fsf@gmail.com> <87jzvsdco1.fsf@posteo.net> <87zg2669kk.fsf@gmail.com> <87sf7w526r.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24532"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: Philip Kaludercic , Eli Zaretskii , 60338-done@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= , Eshel Yaron Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 07 03:01:15 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qe3OT-0006CE-5g for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Sep 2023 03:01:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qe3OK-0001Hf-Ox; Wed, 06 Sep 2023 21:01:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qe3OH-0001HK-C9 for bug-gnu-emacs@gnu.org; Wed, 06 Sep 2023 21:01:01 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qe3OH-0001Tb-3J for bug-gnu-emacs@gnu.org; Wed, 06 Sep 2023 21:01:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qe3OI-0005CY-EQ for bug-gnu-emacs@gnu.org; Wed, 06 Sep 2023 21:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Sep 2023 01:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60338 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 60338-done@debbugs.gnu.org id=D60338.169404844819967 (code D ref 60338); Thu, 07 Sep 2023 01:01:02 +0000 Original-Received: (at 60338-done) by debbugs.gnu.org; 7 Sep 2023 01:00:48 +0000 Original-Received: from localhost ([127.0.0.1]:38181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qe3O3-0005By-No for submit@debbugs.gnu.org; Wed, 06 Sep 2023 21:00:48 -0400 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:50733) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qe3O0-0005Bk-3Z for 60338-done@debbugs.gnu.org; Wed, 06 Sep 2023 21:00:45 -0400 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 676BF5C01B1; Wed, 6 Sep 2023 21:00:37 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 06 Sep 2023 21:00:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1694048437; x=1694134837; bh=uEiyNtyZ0cLkrLkfLLlTXtDSMt8gfjzQJ5t 8h+ZvPnU=; b=F5c0sv/eAuyShLPem6eeC8zgmkRFhRVZLuGym2EqvXwRPF2ocGD K39naOYlZEBhSJJ2C9cQLEhfhNMwetQ2h9M24DX6EI6F9EfN1WkBPcZbRWiHP5n2 eU21guZZBhdsSECw/ZqVM8CoeLRNtkZgbeLImQtpAOx9DtAcG5wqNAioq2kWxRV3 rJB4TvtFqAooIofeg0AzsDoro6aozxOZyrokRveNeUUxUrephdOb5efSC3YqIMAr ldYU0vDnsCo1eoL/uAS/dETZyPyuKLj9C6nqWLEuEfZP/KamAASrcgndEpBoeTRX 7MDnWQREaT7MoPa/S8XctR5hD/ZuOcRxfpQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1694048437; x=1694134837; bh=uEiyNtyZ0cLkrLkfLLlTXtDSMt8gfjzQJ5t 8h+ZvPnU=; b=Zi+ko7V8fCHQF9RitIh2qrxrstYsyxNelL/ElniZL0EepIZWHAX ffk1JfOPdAa9ly78CUIbEMI/yZalAPGg8lVWesa4a6FUZD1S4oFwoOqnnP6bHkKl DTdZtRvFP9yIwBMxf12d94aHDFRK9XJNoLnrqDRZk+WcvdPAOo4asjnET7ezSWof 1b5CzEw140BLLjcrWGGSPRmdkEtyIN5X9eBNt+328T3rkxHndxO9yRMbzX480BLo VW/OF92g68vlG3dtnPoiNE8TJpkPBL7sFCDJlgRA8SZqfIV8Bl5LyV31oWMNHAlW 3vSwUnlJfsBOHb0i36DTOdlGzWy3qdJV7BQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudehgedggeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhephfffheeljeffgeffueeghfekkedtfffgheejvdegjeettdduheeufffggfef jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 6 Sep 2023 21:00:35 -0400 (EDT) Content-Language: en-US In-Reply-To: <87sf7w526r.fsf@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:269599 Archived-At: 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).