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: Mon, 12 Jun 2023 13:29:21 +0000 Message-ID: <87y1koerm6.fsf@posteo.net> References: <87ilhy1dub.fsf@posteo.net> <877cs97kgb.fsf@posteo.net> <83jzw8yjv5.fsf@gnu.org> <877cs8g8oy.fsf@posteo.net> <83fs6wyhak.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="6802"; 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 Mon Jun 12 15:30:57 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 1q8hdH-0001W5-DZ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 12 Jun 2023 15:30:55 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q8hd5-0002BM-Vk; Mon, 12 Jun 2023 09:30:44 -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 1q8hcR-0001Mz-7o for bug-gnu-emacs@gnu.org; Mon, 12 Jun 2023 09:30:04 -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 1q8hcQ-0003x2-Uu for bug-gnu-emacs@gnu.org; Mon, 12 Jun 2023 09:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q8hcQ-00038D-Oo for bug-gnu-emacs@gnu.org; Mon, 12 Jun 2023 09:30: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: Mon, 12 Jun 2023 13:30: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.168657657111974 (code B ref 60338); Mon, 12 Jun 2023 13:30:02 +0000 Original-Received: (at 60338) by debbugs.gnu.org; 12 Jun 2023 13:29:31 +0000 Original-Received: from localhost ([127.0.0.1]:39203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q8hbv-000372-2T for submit@debbugs.gnu.org; Mon, 12 Jun 2023 09:29:31 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:47027) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q8hbr-00036i-RE for 60338@debbugs.gnu.org; Mon, 12 Jun 2023 09:29:28 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id DEACD24002B for <60338@debbugs.gnu.org>; Mon, 12 Jun 2023 15:29:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1686576561; bh=u2xBTEyFqJTcjfI/zINqWB91XFjIFyyjULphzuRpAr8=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version:From; b=IaEKRxgEfQeXeuWaPAvf++rhOfrjnMpgTlJWVIbCmyswVOPsVL2JLo5IRgcENliet BlDHYDt0fgIIVcL7yU6RpJSYQtXKDHIcORoRE/unkuhpOdK92eBiZsSYISPnjg+1ag aCwTkxYVPcJTX68j2y+PSlchNqYAprTbo8ZnU5Zf/EI7pnaZyFkolWNw52EOHQ9dPV bguGTR+xTe5d6kku3uSpo+g//1wrmtbZEz60XBnvlCsBFioIwgh8ZTPbt6vPVejCB9 3u33JAm8VKqyQ2r75PQKUEJpsAT/AWPgHCWTdypDeg8MP6WxGSueN168FaHG+d8GR0 80f6TokleXZsQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Qfswd21cwz9rxH; Mon, 12 Jun 2023 15:29:21 +0200 (CEST) In-Reply-To: <83fs6wyhak.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 12 Jun 2023 15:52:03 +0300") X-Hashcash: 1:20:230612:60338@debbugs.gnu.org::a+2lATgF8jZns5Ff:02pY X-Hashcash: 1:20:230612:eliz@gnu.org::IiT+KuUEUg6z3B4T:4+PW X-Hashcash: 1:20:230612:joaotavora@gmail.com::z/lJT7CuZt1koqUb:7vxc 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:263271 Archived-At: 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. >> > Besides, this assumes the 'diff' command is available, which is not >> > portable -- one more reason not to go that way, or at leas provide an >> > alternative. >> >> I am personally fond of this approach, because I get a regular text >> buffer that I can store or send someone. The fact that diff is not >> available everywhere (even though I would guess any system with a >> language server /should/ have diff installed), is an argument against >> enabling this behaviour by default, not against providing this interface. > > 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. -- Philip Kaludercic