From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#60338: [PATCH] Add option to present server changes as diffs Date: Tue, 13 Jun 2023 21:34:17 +0000 Message-ID: <87v8fr6o86.fsf@posteo.net> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19820"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60338@debbugs.gnu.org, joaotavora@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 13 23:35:34 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 1q9Bfp-0004wO-QB for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Jun 2023 23:35:33 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q9BfP-00032S-8I; Tue, 13 Jun 2023 17:35:07 -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 1q9BfK-00031l-Pe for bug-gnu-emacs@gnu.org; Tue, 13 Jun 2023 17:35:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q9BfK-0007Ja-FN for bug-gnu-emacs@gnu.org; Tue, 13 Jun 2023 17:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q9BfK-0006ki-A8 for bug-gnu-emacs@gnu.org; Tue, 13 Jun 2023 17:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Jun 2023 21:35: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-submit@debbugs.gnu.org id=B60338.168669206725902 (code B ref 60338); Tue, 13 Jun 2023 21:35:02 +0000 Original-Received: (at 60338) by debbugs.gnu.org; 13 Jun 2023 21:34:27 +0000 Original-Received: from localhost ([127.0.0.1]:43200 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9Bek-0006jh-Po for submit@debbugs.gnu.org; Tue, 13 Jun 2023 17:34:27 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:52099) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9Bej-0006jQ-66 for 60338@debbugs.gnu.org; Tue, 13 Jun 2023 17:34:25 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 169FF240103 for <60338@debbugs.gnu.org>; Tue, 13 Jun 2023 23:34:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1686692059; bh=kw+Lm6erVB6SmQMiSrGgUVidxPe07+1H3/IUKSDHhHA=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version:From; b=Y868Euffda2zOhoCQ8mhnDzipmZvuP43/UWFxTR8nVuqjOojD330EcXwXyWQKXlNB BgFnZTAa3iRm24SU6TpQSa0qoy3qKCZMzNpbCZk3v7Y+EzDDMd8LSUOIDE3pJsjXqV LL3jD+XkkSdEkFHfWY9vvl/ZPkDSl+XUkpG/DDNyrGFxnJ9ExIZpfB98Ov7A38JbjM 9PSsohG5GrZpuV3vhhraSvywOtcY7Z/DHZU9hR9asvmil/PLMikzjI9O8PoPodlqHM i9It4P/tOhPwU94mh2p6Si1v9NdaYsZqlUlSE7osJrBJoSjE4N9kmPo3i0eKGZvWuo WFHq5+krwpuNw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Qghdk2Kxgz6tm4; Tue, 13 Jun 2023 23:34:18 +0200 (CEST) In-Reply-To: <83bkhkyeze.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 12 Jun 2023 16:41:57 +0300") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM 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:263348 Archived-At: Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: 60338@debbugs.gnu.org, joaotavora@gmail.com >> Date: Mon, 12 Jun 2023 13:29:21 +0000 >> >> Eli Zaretskii writes: >> >> >> From: Philip Kaludercic >> >> Cc: 60338@debbugs.gnu.org, joaotavora@gmail.com >> >> Date: Mon, 12 Jun 2023 12:35:09 +0000 >> >> >> >> Eli Zaretskii writes: >> >> >> >> > Isn't there a better way of presenting the edits in human-readable >> >> > form than apply them and then run Diff? What format is used by the >> >> > server itself to send the edits? >> >> >> >> The server sends a JSON message. Here is an example from a little toy >> >> project of mine in C, where I intentionally uncommented a #include >> >> directive: >> > >> > And we cannot generate the Diff format from this? >> >> Certainly we /could/, but I don't think that would be worth the effort >> to generate a proper diff manually. > > It doesn't necessarily have to be the full-fledged diffs, it could be > something approximate. After all, this is for human consumption. Not really, the point is that you can apply these diffs directly. Also, I would not say that diffs are not for human consumption. >> > What do we suggest to people who don't have Diff, though? Nothing? >> >> They still have two different options for >> `eglot-confirm-server-initiated-edits', 'confirm (the default) and nil. >> This is the current state. > > IOW, we offer them nothing for this feature. In the sense of a preview? Yes, but I would still argue, that that would be a different feature. I can take a look at that as well, but I know of at least a few people who would be explicitly interested in this kind of a user interface. > Look, I cannot force you to do anything else, if you don't feel like > it, but I don't like this solution, and think we should try harder. I > urge you to try to find some way of presenting the edits in > human-readable form that doesn't need running Diff. I respect your perspective, so I don't want to insist on anything against your or Joao's will. > Thanks in advance.