X-Loop: help-debbugs@HIDDEN Subject: bug#61506: 30.0.50; [PATCH]: Send command in eglot completion exit-function Resent-From: Theodor Thornhill <theo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: joaotavora@HIDDEN, bug-gnu-emacs@HIDDEN Resent-Date: Tue, 14 Feb 2023 11:01:02 +0000 Resent-Message-ID: <handler.61506.B.16763724329294 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 61506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 61506 <at> debbugs.gnu.org Cc: joaotavora@HIDDEN X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN X-Debbugs-Original-Xcc: joaotavora@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.16763724329294 (code B ref -1); Tue, 14 Feb 2023 11:01:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 Feb 2023 11:00:32 +0000 Received: from localhost ([127.0.0.1]:52702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pRt32-0002Pq-D8 for submit <at> debbugs.gnu.org; Tue, 14 Feb 2023 06:00:32 -0500 Received: from lists.gnu.org ([209.51.188.17]:60546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <theo@HIDDEN>) id 1pRt30-0002Pg-RL for submit <at> debbugs.gnu.org; Tue, 14 Feb 2023 06:00:31 -0500 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 <theo@HIDDEN>) id 1pRt2y-0006IO-3a for bug-gnu-emacs@HIDDEN; Tue, 14 Feb 2023 06:00:30 -0500 Received: from out-14.mta0.migadu.com ([2001:41d0:1004:224b::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <theo@HIDDEN>) id 1pRt2v-0005Wp-Kh for bug-gnu-emacs@HIDDEN; Tue, 14 Feb 2023 06:00:27 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1676372422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=iSZWMyZ6Cl5UNAmZ2gS4zf5V9P7NBcfhJaj0v1vSRM8=; b=HxGh8sG3Ch4xxUZc2QdGhVl8pdmBD0jNqwRm9u5TnkxjYBSwnhEeOekPHFkJ4Mu6yQB4B5 9ApLKLWzMUE6e/4duJtJJ7jcid/tgimrS0E1lXcRL7NNi3I4fNpUhlP1erJjOW3uEjbHnN jaqbmF1XPmyy41RbE4h8WwSf12w+slp2PDJBQqKRtiXFU/55MCQxCQGFQucb0JvKw0aeN4 viQD4d7olVnt3OQaPqvuUtg+M4N0XA8v/gvQSGMfd1LazGwjIv+Z0IINEc2KDdooUzkf67 opsYFRBlnQVy9kk8u9KR7qnpdcJbCdwYQL4xoHUQZam0topVF5eYKCl2w1B/1g== From: Theodor Thornhill <theo@HIDDEN> Date: Tue, 14 Feb 2023 12:00:21 +0100 Message-ID: <87h6vo1ph6.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:1004:224b::e; envelope-from=theo@HIDDEN; helo=out-14.mta0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain Hi Joao and others! The LSP spec supports an optional command in the completion results, so that the server can know what completion candidate was selected. That information can then be used by the server to score candidates for better completion results etc. This simple patch adds support for this. I have no strong opinions on _where_ exactly the command should be sent, as in before or after the didchange notification. I've been using this the last couple of days. What do you think? Any objections to me installing this sometime later? Should it be mentioned in NEWS, or isn't it interesting enough? Theo --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Send-command-in-eglot-completion-exit-function.patch From a7756c7f0e1ca9aeca59b496e35000651e0a5252 Mon Sep 17 00:00:00 2001 From: Theodor Thornhill <theo@HIDDEN> Date: Tue, 14 Feb 2023 11:52:57 +0100 Subject: [PATCH] Send command in eglot completion exit-function * lisp/progmodes/eglot.el: Destructure optional argument command. (eglot-completion-at-point): Send command if supplied by server. --- lisp/progmodes/eglot.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 6caf5894ed..4526f41812 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -2923,7 +2923,7 @@ eglot-completion-at-point (window-buffer (minibuffer-selected-window)) (current-buffer)) (eglot--dbind ((CompletionItem) insertTextFormat - insertText textEdit additionalTextEdits label) + insertText textEdit additionalTextEdits label command) (funcall resolve-maybe (or (get-text-property 0 'eglot--lsp-item proxy) @@ -2963,6 +2963,9 @@ eglot-completion-at-point (when (cl-plusp (length additionalTextEdits)) (eglot--apply-text-edits additionalTextEdits))) (eglot--signal-textDocument/didChange) + (when command + (eglot--dbind ((Command) command arguments) command + (eglot-execute-command server (intern command) arguments))) (eldoc))))))))) (defun eglot--hover-info (contents &optional _range) -- 2.34.1 --=-=-=--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Theodor Thornhill <theo@HIDDEN> Subject: bug#61506: Acknowledgement (30.0.50; [PATCH]: Send command in eglot completion exit-function) Message-ID: <handler.61506.B.16763724329294.ack <at> debbugs.gnu.org> References: <87h6vo1ph6.fsf@HIDDEN> X-Gnu-PR-Message: ack 61506 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 61506 <at> debbugs.gnu.org Date: Tue, 14 Feb 2023 11:01:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. As you requested using X-Debbugs-CC, your message was also forwarded to joaotavora@HIDDEN (after having been given a bug report number, if it did not have one). Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 61506 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 61506: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D61506 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#61506: 30.0.50; [PATCH]: Send command in eglot completion exit-function Resent-From: Felician Nemeth <felician.nemeth@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 14 Feb 2023 15:58:01 +0000 Resent-Message-ID: <handler.61506.B61506.167639022821660 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 61506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 61506 <at> debbugs.gnu.org Cc: Theodor Thornhill <theo@HIDDEN>, joaotavora@HIDDEN Received: via spool by 61506-submit <at> debbugs.gnu.org id=B61506.167639022821660 (code B ref 61506); Tue, 14 Feb 2023 15:58:01 +0000 Received: (at 61506) by debbugs.gnu.org; 14 Feb 2023 15:57:08 +0000 Received: from localhost ([127.0.0.1]:56767 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pRxg4-0005dI-4b for submit <at> debbugs.gnu.org; Tue, 14 Feb 2023 10:57:08 -0500 Received: from mail-wr1-f48.google.com ([209.85.221.48]:40450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <felician.nemeth@HIDDEN>) id 1pRxg2-0005cn-0Z for 61506 <at> debbugs.gnu.org; Tue, 14 Feb 2023 10:57:06 -0500 Received: by mail-wr1-f48.google.com with SMTP id r2so16147968wrv.7 for <61506 <at> debbugs.gnu.org>; Tue, 14 Feb 2023 07:57:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:face:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=5E4qEu6GaZY34DLcOV91Hr5fxnfgcGbbW6adoiqLxVg=; b=mGY4Gy+NzQzKSn94mBbu6zzHBAUcAfTccnV8qtR78mE/ic4fNy59/03YPk3NPPqKpe uWxNSJRdhSCWyis3s27/6uiiojeNb+ON4L2Ha9aJ5CPpQkA99Lrh71dotRBsiUwgFGH4 YUCNmw6rcGzwSOEzyNaBVFT2HebPD5i+Qg+ebkaks1zjnQ/vmPTmWoK8CQELN9TiHuMY 0QYw6CwQcZUejuXQtqrZeU5wxuD0vu2wLUj6sRpcMPTNYK0/AYZ0XFcBCkBPSpNUZs3b AizvXYRx1sBxt3hTAUM5OWyjmrIThj6BPsgjxsqFxNr4kaaZkF3PjaRueLbCWCL5SThf HSDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:face:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=5E4qEu6GaZY34DLcOV91Hr5fxnfgcGbbW6adoiqLxVg=; b=v5mTTUy2dnIxpLm8JE8mtzqyZq6nvQaQ5xhKp+uAW2uFSKQRzJFg13/h9gWVudWolh 2v4O493+zfgnQn1WhboEHCxNyeD8njz6jawV4R7PwOC0d2cdGmBL0elmuGnEDisc8IvI InK4tJsJuxrNwKQLkIuKGlwMT3F0REoU+6dy8wWMIri/VGy/4+MvbXp0a3CpcdSNymcY kChCwiQneqBXbslDmA1zgncDgzYTg49pGq1C7J8hFMb9LFJqkE+EhCT2kAJV+5UVXdgs ueddw8Xyb+sx2V5Kjpt0H0kyn0MWJc68S27c2bhkaUAbhspy13kVErIpU6hZnjnTzP// K53A== X-Gm-Message-State: AO0yUKXlwHz3a8OAVmZ1IJlw0C63xoAikigJTA6b8nXvLbzKVJyz8Thq eOEu73O7zTOCNkYX7hSku5g= X-Google-Smtp-Source: AK7set8cwNcIcizuv2O6OuaP9nCTcXjE4nsLTRk2jK4OMqE39/SmehCwvqylmCxorSEZ627p4Yr29w== X-Received: by 2002:a5d:4649:0:b0:2c5:557f:93bb with SMTP id j9-20020a5d4649000000b002c5557f93bbmr2684728wrs.10.1676390219966; Tue, 14 Feb 2023 07:56:59 -0800 (PST) Received: from betli.gmail.com (catv-86-101-66-128.catv.fixed.vodafone.hu. [86.101.66.128]) by smtp.gmail.com with ESMTPSA id d12-20020adfe84c000000b002c3f03d8851sm1603351wrn.16.2023.02.14.07.56.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Feb 2023 07:56:59 -0800 (PST) From: Felician Nemeth <felician.nemeth@HIDDEN> References: <87h6vo1ph6.fsf@HIDDEN> Date: Tue, 14 Feb 2023 16:56:58 +0100 In-Reply-To: <87h6vo1ph6.fsf@HIDDEN> (Theodor Thornhill via's message of "Tue, 14 Feb 2023 12:00:21 +0100") Message-ID: <87pmacjl4l.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEX5+fmhoaEwMDD/ ///TMNVWAAAAAWJLR0QDEQxM8gAAAAlwSFlzAAAPEgAADxIBIZvyMwAAAAd0SU1FB+AICBUfHgLs gGoAAAGXSURBVCjPRdK/b5tAFAfw753gBEwM2ApMbuVIqf+Ko0qiyhOu4sj2xJBYMn/FUdX7UUUZ OjHgyvf+yj6IcW6Bjx53934ADEvs8bmEr8UVoTYTOyJO9KoYsVofN8kILdbeJ8Li6YpZWop4xOK0 VdfIoXmkHn5/5D7/Ts/8THacSqnkKTcMTxgUkVzFnEIRTKwwYYSCvzfg16f0i8YApW/XG/Pm8R49 dXjxKmRnxv3OwooQWcv4RUYem1fsNe/WU63uk7AmYxk78y32/ee2tZB4fO+WcZ7lnIGEolXW1EGw LfkSuQ0XTgRefgNlfNwRNV6QhBxJ8JNxTMUPyBqTd0bjaAP5G7NJRU39z80hLOZTjqB7K3tEEFSj aEsuQew6qBxxyhHjVUR7H7NpC9iHJZGLMCEuweqAqE1BHbfK2oRIz9EHYA/+wiFWru9smeVfuWNZ 2+NFtX80UA1TvJNdytM4DwO4kY7bJz8Qcd0G0ceslZGkkeoBsjUHwF1+jjM3XHaXEZ7mGLfwPFO+ RV9QLY2iEdmDo78D/gNPaXVYqd+pyQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNi0wOC0wOFQyMzoz MDoyOCswMjowMGy/yHYAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTYtMDgtMDhUMjM6MzA6MjgrMDI6 MDAd4nDKAAAAAElFTkSuQmCC MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi Theo, > The LSP spec supports an optional command in the completion results, so > that the server can know what completion candidate was selected. That > information can then be used by the server to score candidates for > better completion results etc. Can you list some servers that send this info? And if it is not too much trouble can write a simple recipe where supporting this feature actually makes a difference? Thanks. > This simple patch adds support for this. > I have no strong opinions on _where_ exactly the command should be sent, > as in before or after the didchange notification. The specification only says: "An optional command that is executed *after* inserting this completion." I think it is worth asking for clarification at https://github.com/microsoft/language-server-protocol (I'd guess it's safer to send the command after the didChange notification.)
X-Loop: help-debbugs@HIDDEN Subject: bug#61506: 30.0.50; [PATCH]: Send command in eglot completion exit-function Resent-From: Theodor Thornhill <theo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 14 Feb 2023 17:45:02 +0000 Resent-Message-ID: <handler.61506.B61506.167639665331790 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 61506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Felician Nemeth <felician.nemeth@HIDDEN>, 61506 <at> debbugs.gnu.org Cc: joaotavora@HIDDEN Received: via spool by 61506-submit <at> debbugs.gnu.org id=B61506.167639665331790 (code B ref 61506); Tue, 14 Feb 2023 17:45:02 +0000 Received: (at 61506) by debbugs.gnu.org; 14 Feb 2023 17:44:13 +0000 Received: from localhost ([127.0.0.1]:56894 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pRzLh-0008Ge-BV for submit <at> debbugs.gnu.org; Tue, 14 Feb 2023 12:44:13 -0500 Received: from out-96.mta0.migadu.com ([91.218.175.96]:44797) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <theo@HIDDEN>) id 1pRzLf-0008GU-Tr for 61506 <at> debbugs.gnu.org; Tue, 14 Feb 2023 12:44:13 -0500 Date: Tue, 14 Feb 2023 18:44:01 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1676396646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bLT59A2xLfevosh4ZW6Uqwb0OjE12CO78Xn47qbT5YU=; b=R6veChQVw30Ov9tFlxE1EqRbA5/wa3lFbU0vGNCY3k7xbrEWzvov5dZMYCKwWW4pQoFOzv 4ddLiXt/YfdgOQMEI9Jy/iG5BjZsjqSSDkwWA63k7jd6YPaJ13Na8rANxUTqeWzuApo2L8 xVyGL0rvOXxmCz1l8K1/q+eWkiXq8us5/9bGcGTd2gtv1CCePHt+4XRYST4rkK7IA4ldNR 4jvh8sJ8QipnpuHB9fAodoJdDwlxE4UbnEKU6thvzUTGpnY6CUuNuRynZlxElLAgRD2BWG de+o3U7oKcpai1AIPW8LKnd6S1ABcGV+oJlaJtnVznMkf9H0B922G7QO2NQRhQ== X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and include these headers. From: Theodor Thornhill <theo@HIDDEN> In-Reply-To: <87pmacjl4l.fsf@HIDDEN> References: <87h6vo1ph6.fsf@HIDDEN> <87pmacjl4l.fsf@HIDDEN> Message-ID: <74E0BF9F-42AF-4578-9681-D0FB936081AE@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) On 14 February 2023 16:56:58 CET, Felician Nemeth <felician=2Enemeth@gmail= =2Ecom> wrote: >Hi Theo, > >> The LSP spec supports an optional command in the completion results, so >> that the server can know what completion candidate was selected=2E Tha= t >> information can then be used by the server to score candidates for >> better completion results etc=2E > >Can you list some servers that send this info? And if it is not too >much trouble can write a simple recipe where supporting this feature >actually makes a difference? Thanks=2E > Jdtls does=2E See https://github=2Ecom/eclipse/eclipse=2Ejdt=2Els/blob/c4e= d39a70e8c32e055a1b136ceb6c0477687a330/org=2Eeclipse=2Ejdt=2Els=2Ecore/src/o= rg/eclipse/jdt/ls/core/internal/JDTDelegateCommandHandler=2Ejava#L152 As for proving a difference, not sure how easy that is=2E The code around = the link I posted seems to score, so I guess over time the server should le= arn _something_=2E It's a little hard to verify anyway because eglot doesn'= t respect the ordering provided by the server (which is a different bug in = itself)=2E Anyway, lsp-mode, neovim and others support this, so I see no reason we sh= ouldn't :) >> This simple patch adds support for this=2E >> I have no strong opinions on _where_ exactly the command should be sent= , >> as in before or after the didchange notification=2E > >The specification only says: "An optional command that is executed >*after* inserting this completion=2E" I think it is worth asking for >clarification at https://github=2Ecom/microsoft/language-server-protocol >(I'd guess it's safer to send the command after the didChange >notification=2E) I agree=2E Theo
X-Loop: help-debbugs@HIDDEN Subject: bug#61506: 30.0.50; [PATCH]: Send command in eglot completion exit-function Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 14 Feb 2023 23:48:01 +0000 Resent-Message-ID: <handler.61506.B61506.167641847426034 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 61506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Theodor Thornhill <theo@HIDDEN> Cc: Felician Nemeth <felician.nemeth@HIDDEN>, 61506 <at> debbugs.gnu.org Received: via spool by 61506-submit <at> debbugs.gnu.org id=B61506.167641847426034 (code B ref 61506); Tue, 14 Feb 2023 23:48:01 +0000 Received: (at 61506) by debbugs.gnu.org; 14 Feb 2023 23:47:54 +0000 Received: from localhost ([127.0.0.1]:57365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pS51d-0006ln-V6 for submit <at> debbugs.gnu.org; Tue, 14 Feb 2023 18:47:54 -0500 Received: from mail-wr1-f52.google.com ([209.85.221.52]:46858) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>) id 1pS51c-0006kx-GB for 61506 <at> debbugs.gnu.org; Tue, 14 Feb 2023 18:47:52 -0500 Received: by mail-wr1-f52.google.com with SMTP id m14so17403838wrg.13 for <61506 <at> debbugs.gnu.org>; Tue, 14 Feb 2023 15:47:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nKfAMX0S7TNY8BnctNG2Xw0ye6FsNE8bkB/10TnEFPg=; b=RcWKLiS9fBD/eDAcJmdNHp0ccMGGr8SosF/Zcci+WnQ+SHFL+nXIU4ZTXc/Bn1uYgh Uhk8wUIJAvJErkk4v3K2FGuD3FHBqx8pLIKv2JVhF7FiU7qLofCRDac6FTj8ntimKZMT qgnAFEywZsmpLD8ajinaMUWrRt1hmnqFPt1y0nBbyGqnzsw+E9+FqMm5hZIjxn2bHtti ErK0xKxP0QVzVLh3E3wsgtnnr6E73nTWM9ZpFKNyRx24Jto9Dm3JR8byaEn7p69ABIUm bSeh92tkF8H58Qtuh+4D5NoTUMfRid/nWgqLs2eQhpA4nolR0LsrP1KILqiPU8oMPQg0 T8rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=nKfAMX0S7TNY8BnctNG2Xw0ye6FsNE8bkB/10TnEFPg=; b=48sOowsp+k2GL+rObp2M5e2PrNhfrhQSmavWndJrXSKRI/2363bweFkaN5bcxdzeaN tfbacPUV8+p4fUcAmh4/J/s7xKE2nHk4NC2cnLrpoS7LWcRXDIXd4CrUnmF9IMHivLZX W/257StQqF4TUITrenaBfGrZ7x7paZgI1UR0I+CCeYhL/JmU4VxzAUNHoIm9TDwnFMsc m/NS05KHOJnl3Cqa5w5fyE4+Xjqf8KwCwK12DAD8FOmN/F7BAMJecpjHFqYQHxi7Pr+6 796sXNWKTQVbFejossNUW9gtZweVszbojoLkhmZaztb+Um++QkVvyDbgTwQv5KANWu1y 5cBg== X-Gm-Message-State: AO0yUKXTUCJypPDYEsE00ZcgeNPOYF5gR4b/f5yzaKewj47DxJeEss7O C3k45YIrwtFWr6ZMsCPdEQ3sUjdgvII= X-Google-Smtp-Source: AK7set9mXIUXv3/LX/A3xqUKJXULNmGHce7VUVahSizhI5RWl4EplzeFJNOZCOSU7wJchFNvz69yVQ== X-Received: by 2002:adf:ea47:0:b0:2c5:510b:8f9c with SMTP id j7-20020adfea47000000b002c5510b8f9cmr3593526wrn.52.1676418466339; Tue, 14 Feb 2023 15:47:46 -0800 (PST) Received: from krug (87-196-72-142.net.novis.pt. [87.196.72.142]) by smtp.gmail.com with ESMTPSA id d15-20020a5d6dcf000000b002c3f9404c45sm14530046wrz.7.2023.02.14.15.47.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Feb 2023 15:47:45 -0800 (PST) From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN> In-Reply-To: <74E0BF9F-42AF-4578-9681-D0FB936081AE@HIDDEN> (Theodor Thornhill's message of "Tue, 14 Feb 2023 18:44:01 +0100") References: <87h6vo1ph6.fsf@HIDDEN> <87pmacjl4l.fsf@HIDDEN> <74E0BF9F-42AF-4578-9681-D0FB936081AE@HIDDEN> Date: Tue, 14 Feb 2023 23:49:35 +0000 Message-ID: <87v8k3st80.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Theodor Thornhill <theo@HIDDEN> writes: >>Can you list some servers that send this info? And if it is not too >>much trouble can write a simple recipe where supporting this feature >>actually makes a difference? Thanks. > > As for proving a difference, not sure how easy that is. The code > around the link I posted seems to score, so I guess over time the > server should learn _something_. It's a little hard to verify anyway > because eglot doesn't respect the ordering provided by the server > (which is a different bug in itself). I don't understand what you mean. There is this code in eglot-completion-at-point: =20 ... (sort-completions (lambda (completions) (cl-sort completions #'string-lessp :key (lambda (c) (or (plist-get (get-text-property 0 'eglot--lsp-item c) :sortText) ""))))) ... Is it not working? I see sensible orderings in the servers I use. Is there a reported bug about this? If there isn't, please make one. > Anyway, lsp-mode, neovim and others support this, so I see no reason > we shouldn't :) FWIW I don't see this as a good enough reason in itself. If there is little to no discernible benefit, supporting esoteric features can become code bloat that makes maintenance of more important features difficult. There is a fair amount of junk in the LSP standard, or simply stuff that doesn't make as much sense in Emacs as it does in other editors. Regardless, I'm not opposed to this feature if there's a simple enough patch. But we should weigh pros and cons -- and Felici=C3=A1n's request to measure the pros is quite reasonable. (Not to mention that a smart enough server can already derive these smarts from the evolution of the LSP document's contents as reported by the client.) Jo=C3=A3o
X-Loop: help-debbugs@HIDDEN Subject: bug#61506: 30.0.50; [PATCH]: Send command in eglot completion exit-function Resent-From: Felician Nemeth <felician.nemeth@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 15 Feb 2023 11:52:01 +0000 Resent-Message-ID: <handler.61506.B61506.16764618964525 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 61506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Theodor Thornhill <theo@HIDDEN> Cc: 61506 <at> debbugs.gnu.org, joaotavora@HIDDEN Received: via spool by 61506-submit <at> debbugs.gnu.org id=B61506.16764618964525 (code B ref 61506); Wed, 15 Feb 2023 11:52:01 +0000 Received: (at 61506) by debbugs.gnu.org; 15 Feb 2023 11:51:36 +0000 Received: from localhost ([127.0.0.1]:58041 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pSGK0-0001At-0R for submit <at> debbugs.gnu.org; Wed, 15 Feb 2023 06:51:36 -0500 Received: from mail-wm1-f49.google.com ([209.85.128.49]:55232) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <felician.nemeth@HIDDEN>) id 1pSGJv-0001Ae-Ku for 61506 <at> debbugs.gnu.org; Wed, 15 Feb 2023 06:51:35 -0500 Received: by mail-wm1-f49.google.com with SMTP id p5so724987wmg.4 for <61506 <at> debbugs.gnu.org>; Wed, 15 Feb 2023 03:51:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:face:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=GlbPSyWPWdnBs8Mieol5O1em+vLVBg9Bk4PVguyVm+k=; b=HoZwTRj1EWZc/vVTlnEf+jvnq7Am1RDu/NOPpJnymkp2BOkRw8MAueAW9MRCXNtLMC d61ifKEdY5yuSo2jRTf8jOKIwSwdU2n553hM6MgzmKeN7oeWRL0nbYtebBIJuwqul3C/ fj0e94RFsB1a2Qv/UMB1WZN094wZFHTtf8GKAMlmD4zRgKhqEYbmdOldcdvyIrBdGZjY eOVHXj3ookDs3RKfpUXh+T2aeSHCcEi73NIVNCE7v24MSDB7OOn0Qqg2WIjs+AUjNFvU KYLGwp/xUgq6cC+jYk/zZY+NAHTtwNY/AHQRil5M7ItuuF3FMZi4ZnplZMkF896Jkf9b eXYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:face:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=GlbPSyWPWdnBs8Mieol5O1em+vLVBg9Bk4PVguyVm+k=; b=KDxiSkZK6sJV1RmUhH6l9iUKMFD3YutSjcxODcJ/cxEsQLP+uuHPa3I5bg8xg0mjFL 5z+5A2lVDUmhXZhHawhhJetIwMinIiVkYwee4JrKW32pezPgDuWJ/dBzPrnCaTa5JHTy okBskq/+ho9vJF39AdrOeZ2OdsPxf7bYMWp7BQ7oLtnG+c3wDyvLietY5Dp0Fiohe+8a lCuqi3t9H9JfojvAqaKaZKSmhR5Sb4MacWgolG9e7I4mrPeV2oH+wevnhO/1X0pGwUMn OBGR57gL61OkuN2c3GkgEOWN4G5szeJ8ExAQR3ueOELOQy4bdCNk6Rmv36NYsIystsVk lHSQ== X-Gm-Message-State: AO0yUKU99COzGhm7WsFWJfzfwvG0u5wBKGHOLVcHuJAQBWiBg2cYh930 5YrTJ834F95komixEqS1+qE= X-Google-Smtp-Source: AK7set/OluWOaq6FXy5DcPFj2RZ080ebtYGj4+U8wvY45r1yzFdPjiZhSo4MmJT66KoT38t8BVcwvA== X-Received: by 2002:a05:600c:3b91:b0:3db:2e6e:7826 with SMTP id n17-20020a05600c3b9100b003db2e6e7826mr2276924wms.5.1676461885552; Wed, 15 Feb 2023 03:51:25 -0800 (PST) Received: from betli.gmail.com (catv-86-101-66-128.catv.fixed.vodafone.hu. [86.101.66.128]) by smtp.gmail.com with ESMTPSA id x7-20020a05600c188700b003cffd3c3d6csm1779832wmp.12.2023.02.15.03.51.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Feb 2023 03:51:25 -0800 (PST) From: Felician Nemeth <felician.nemeth@HIDDEN> References: <87h6vo1ph6.fsf@HIDDEN> <87pmacjl4l.fsf@HIDDEN> <74E0BF9F-42AF-4578-9681-D0FB936081AE@HIDDEN> Date: Wed, 15 Feb 2023 12:51:23 +0100 In-Reply-To: <74E0BF9F-42AF-4578-9681-D0FB936081AE@HIDDEN> (Theodor Thornhill via's message of "Tue, 14 Feb 2023 18:44:01 +0100") Message-ID: <87pmabi1tw.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEWOdXElERN7LDLZs6/l 0dDQq6TepMcqAAACW0lEQVQ4jWWSzY7bMAyEaSm6mypylxjkroTRvUW8d9lavf+r7NDOZotWQHzg lyGHP0Sn5ed9qKrLWWIWos9/QJWIeCSywPNTd/AE0LtwFj7A+3WT5PwfeBrQKcsBnkfwVcNySWQr 3i34XN6gRNgis/v4uwSKHCD9lPitB0Aq9BHfHX4cgsI7cJJfLdZg/4bbCzoRmkD9MsagQSBDedZi CgNxkVSJmSOStTBUBKkywEnEoZzbwWj+ACiVJkF6pOpak2PMCqkMYDpaw+gatLR8atMOrB3JGzmm 3rSQo+tkxU+UAbhQSgtslULhsXKk6+IyQ1QTzeQB0MzjlpkCEUCeUdviWrwBcxVqpZjP+v0MYPA0 aq2rvIEZe4GRM0v+9QIB03rsABVSk5y+Mz3LSzExtJLlCCO6dV1uzDQFTBad+gO0TqqL9XE8x4ek +orvYiMJgzC8e+r6TqaPaK6QyqVNvoHtsRrooQ6tTi4vgaSkd8wIikodB3B0iIk58avsDdYNajpS bSKJ+mQnipGszB6zW4lGgsOkKHE2RWVcBpwhaIv3BYIAu3WsnC7YYKLRchp6w8fRGZIWiZuFsVai 7gbcUcJEhiDZ3K1+uzZvBlfaEO8oH4MLu6/hrKVM7QpQcIXJFuC1XjfbfKRxNslk94l9cYcEihV2 HWyNDQAXaLsvnrSyp7HaQhrAn13V6/XW11nh0XINBOEAV+tHK4EvAGNGvEwc0eZw8Vyr56imYEsV sOW9jxm/yb9AH1ufqGMviIK7A0Tc/723oM3tJ4HTOu9gDr3ftbdkxfdjsUv5AqWKwyfCYo5WAAAA AElFTkSuQmCC MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) >>> I have no strong opinions on _where_ exactly the command should be sent, >>> as in before or after the didchange notification. I've created an issue about it here: https://github.com/microsoft/language-server-protocol/issues/1672
X-Loop: help-debbugs@HIDDEN Subject: bug#61506: 30.0.50; [PATCH]: Send command in eglot completion exit-function Resent-From: Theodor Thornhill <theo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 15 Feb 2023 12:25:01 +0000 Resent-Message-ID: <handler.61506.B61506.16764638539324 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 61506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Felician Nemeth <felician.nemeth@HIDDEN> Cc: 61506 <at> debbugs.gnu.org, joaotavora@HIDDEN Received: via spool by 61506-submit <at> debbugs.gnu.org id=B61506.16764638539324 (code B ref 61506); Wed, 15 Feb 2023 12:25:01 +0000 Received: (at 61506) by debbugs.gnu.org; 15 Feb 2023 12:24:13 +0000 Received: from localhost ([127.0.0.1]:58112 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pSGpX-0002QH-CR for submit <at> debbugs.gnu.org; Wed, 15 Feb 2023 07:24:12 -0500 Received: from out-131.mta1.migadu.com ([95.215.58.131]:63883) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <theo@HIDDEN>) id 1pSGpR-0002Py-Tp for 61506 <at> debbugs.gnu.org; Wed, 15 Feb 2023 07:24:10 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1676463844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bE2qxWZR6PsXOYCJP9q96r035rZU+RJ5dawxL/v2AtY=; b=LWCzgtrbk0Iyv1hvabUdQO9pjHQiGgn9jSwbTSZEM6h2/mPL7sdOTskVdcdtqZLbM/VFa3 0J6RHmfMS/w4UaFm/MCBWY0QIc8iUOSMa/dWMk4dvya2xYV+v7EBPAyx6TUBASHyRccpLU OZa1JMowEt0+5SO9do3N02a5iVbC00dWfCA+seIQNJYlmMzUz32uWDFlk0mB23Qna2b8HY CPeOXvDl3olu/4dRce8o71ot5jbUa15JDIm9Rsax+bZzCivBqYvsJWhbmwz8CgICNyks4q ABQQX6GsKMSn7Rwe3Ln6VU9w2mjg8F/nbyN2FkqfUa9TgPROg0G/N32OcKAVAw== From: Theodor Thornhill <theo@HIDDEN> In-Reply-To: <87pmabi1tw.fsf@HIDDEN> References: <87h6vo1ph6.fsf@HIDDEN> <87pmacjl4l.fsf@HIDDEN> <74E0BF9F-42AF-4578-9681-D0FB936081AE@HIDDEN> <87pmabi1tw.fsf@HIDDEN> Date: Wed, 15 Feb 2023 13:24:02 +0100 Message-ID: <878rgzqfq5.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Felician Nemeth <felician.nemeth@HIDDEN> writes: >>>> I have no strong opinions on _where_ exactly the command should be sent, >>>> as in before or after the didchange notification. > > I've created an issue about it here: > https://github.com/microsoft/language-server-protocol/issues/1672 Nice, thanks! Theo
X-Loop: help-debbugs@HIDDEN Subject: bug#61506: 30.0.50; [PATCH]: Send command in eglot completion exit-function Resent-From: Theodor Thornhill <theo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 15 Feb 2023 12:35:02 +0000 Resent-Message-ID: <handler.61506.B61506.167646447919515 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 61506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN> Cc: Felician Nemeth <felician.nemeth@HIDDEN>, 61506 <at> debbugs.gnu.org Received: via spool by 61506-submit <at> debbugs.gnu.org id=B61506.167646447919515 (code B ref 61506); Wed, 15 Feb 2023 12:35:02 +0000 Received: (at 61506) by debbugs.gnu.org; 15 Feb 2023 12:34:39 +0000 Received: from localhost ([127.0.0.1]:58123 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pSGzf-00054h-6G for submit <at> debbugs.gnu.org; Wed, 15 Feb 2023 07:34:39 -0500 Received: from out-61.mta1.migadu.com ([95.215.58.61]:16124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <theo@HIDDEN>) id 1pSGza-00054U-79 for 61506 <at> debbugs.gnu.org; Wed, 15 Feb 2023 07:34:37 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1676464473; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FhjjjKdASPy/LFGEimfPeydr+Pttivzy5SW8LqS4bW4=; b=WzegHW7RS26zwgPB7dUe/5XhO8cG1Bv0rHxKWZeMjXFJOGdXgZwKovWfHxBHLMq7bDtcti AZBthm/8jr+b/NvazSUgEMiSL/arMAUqRUP+vnm3iqtKcWRTPp8w0s6afAox0Di8TGHIn3 TocnAAYr8uAb9JAbfYYWavwF7lHq1DnEPvRvxSOTAD2QYW75HTH6SApJ+iRJf2gUPQLkNi x5PhZaEAYIE0WqSORrnqr+DZemos3e/Lz0VCr79UZfzT06TnZdBao3w98vG9+YyFsoNhS3 x495Oa/xBN+E/eqAbiDgjNxQSkeBehwz15tK8U4CTc5JvIUQNPViIOxz4UGR+g== From: Theodor Thornhill <theo@HIDDEN> In-Reply-To: <87v8k3st80.fsf@HIDDEN> References: <87h6vo1ph6.fsf@HIDDEN> <87pmacjl4l.fsf@HIDDEN> <74E0BF9F-42AF-4578-9681-D0FB936081AE@HIDDEN> <87v8k3st80.fsf@HIDDEN> Date: Wed, 15 Feb 2023 13:34:32 +0100 Message-ID: <875yc3qf8n.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Jo=C3=A3o T=C3=A1vora <joaotavora@HIDDEN> writes: > Theodor Thornhill <theo@HIDDEN> writes: > >>>Can you list some servers that send this info? And if it is not too >>>much trouble can write a simple recipe where supporting this feature >>>actually makes a difference? Thanks. >> >> As for proving a difference, not sure how easy that is. The code >> around the link I posted seems to score, so I guess over time the >> server should learn _something_. It's a little hard to verify anyway >> because eglot doesn't respect the ordering provided by the server >> (which is a different bug in itself). > > I don't understand what you mean. There is this code in > eglot-completion-at-point: >=20=20 > ... > (sort-completions > (lambda (completions) > (cl-sort completions > #'string-lessp > :key (lambda (c) > (or (plist-get > (get-text-property 0 'eglot--lsp-item c) > :sortText) > ""))))) > ... > > Is it not working? I see sensible orderings in the servers I use. Is > there a reported bug about this? If there isn't, please make one. > It seems something happens with yasnippets. I only have the symptoms yet, but I'll make a report when I know what's happening :) >> Anyway, lsp-mode, neovim and others support this, so I see no reason >> we shouldn't :) > > FWIW I don't see this as a good enough reason in itself. If there is > little to no discernible benefit, supporting esoteric features can > become code bloat that makes maintenance of more important features > difficult. There is a fair amount of junk in the LSP standard, or > simply stuff that doesn't make as much sense in Emacs as it does in > other editors. > Yeah, I agree. However, this should make sense in Emacs too, no? > Regardless, I'm not opposed to this feature if there's a simple enough > patch. But we should weigh pros and cons -- and Felici=C3=A1n's request = to > measure the pros is quite reasonable. The patch is simple enough, it could just be its own function, to be executed. Then it's a one-liner in the exit-function > > (Not to mention that a smart enough server can already derive these > smarts from the evolution of the LSP document's contents as reported by > the client.) > Maybe - I don't think that's reason enough to dismiss the command argument outright, though. > Jo=C3=A3o Theo
X-Loop: help-debbugs@HIDDEN Subject: bug#61506: 30.0.50; [PATCH]: Send command in eglot completion exit-function Resent-From: Theodor Thornhill <theo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 18 Feb 2023 22:21:01 +0000 Resent-Message-ID: <handler.61506.B61506.167675881116748 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 61506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN> Cc: Felician Nemeth <felician.nemeth@HIDDEN>, 61506 <at> debbugs.gnu.org Received: via spool by 61506-submit <at> debbugs.gnu.org id=B61506.167675881116748 (code B ref 61506); Sat, 18 Feb 2023 22:21:01 +0000 Received: (at 61506) by debbugs.gnu.org; 18 Feb 2023 22:20:11 +0000 Received: from localhost ([127.0.0.1]:45125 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pTVYt-0004Lz-Ck for submit <at> debbugs.gnu.org; Sat, 18 Feb 2023 17:20:11 -0500 Received: from out0.migadu.com ([94.23.1.103]:56396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <theo@HIDDEN>) id 1pTVYr-0004Lh-DF for 61506 <at> debbugs.gnu.org; Sat, 18 Feb 2023 17:20:05 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1676758802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KXlBXxstuZGbkT+A8+a++8Ej5dE7CBfaB2O4h57WGrc=; b=TeLinec1vZP3vXn3yFCwJ2w9+edbGBOG4o2aKZ7GJBM4/bVEgLRJWPixCE5LgP+J5IWZ3B Fu3DFokUZz4o+T0bpZFPGPi/koN1/L8q70yCWochQzgaWQKV42PSASZ3prYOedXXTZQPdN uQC0wmVKPtGizqj85gmTByMOWATdvPKKWw4L7wc9UU0Fa47ZyV33aaRrGNe9OTc/5P0CXG t+JD5iyeDobgwgk7b6xp2JaBzZMl+JFF7hYyk+RSir8ZawOUNAwrgR0VOFw9yF42txflgC dvSNrVcrW+OfsKwQDNSl90TEabyu74Nvd7WELa7Ha8FEiAewwOP86ppRnEz8SQ== From: Theodor Thornhill <theo@HIDDEN> In-Reply-To: <875yc3qf8n.fsf@HIDDEN> (Theodor Thornhill's message of "Wed, 15 Feb 2023 13:34:32 +0100") References: <87h6vo1ph6.fsf@HIDDEN> <87pmacjl4l.fsf@HIDDEN> <74E0BF9F-42AF-4578-9681-D0FB936081AE@HIDDEN> <87v8k3st80.fsf@HIDDEN> <875yc3qf8n.fsf@HIDDEN> Date: Sat, 18 Feb 2023 23:20:00 +0100 Message-ID: <87357262gf.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) Ping :-) >> >> FWIW I don't see this as a good enough reason in itself. If there is >> little to no discernible benefit, supporting esoteric features can >> become code bloat that makes maintenance of more important features >> difficult. There is a fair amount of junk in the LSP standard, or >> simply stuff that doesn't make as much sense in Emacs as it does in >> other editors. >> > > Yeah, I agree. However, this should make sense in Emacs too, no? > >> Regardless, I'm not opposed to this feature if there's a simple enough >> patch. But we should weigh pros and cons -- and Felici=C3=A1n's request= to >> measure the pros is quite reasonable. > > The patch is simple enough, it could just be its own function, to be > executed. Then it's a one-liner in the exit-function > >> >> (Not to mention that a smart enough server can already derive these >> smarts from the evolution of the LSP document's contents as reported by >> the client.) >> > > Maybe - I don't think that's reason enough to dismiss the command > argument outright, though. > >> Jo=C3=A3o > > Theo
X-Loop: help-debbugs@HIDDEN Subject: bug#61506: 30.0.50; [PATCH]: Send command in eglot completion exit-function Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 18 Feb 2023 23:23:01 +0000 Resent-Message-ID: <handler.61506.B61506.167676252923312 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 61506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Theodor Thornhill <theo@HIDDEN> Cc: Felician Nemeth <felician.nemeth@HIDDEN>, 61506 <at> debbugs.gnu.org Received: via spool by 61506-submit <at> debbugs.gnu.org id=B61506.167676252923312 (code B ref 61506); Sat, 18 Feb 2023 23:23:01 +0000 Received: (at 61506) by debbugs.gnu.org; 18 Feb 2023 23:22:09 +0000 Received: from localhost ([127.0.0.1]:45154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pTWWv-00063w-Am for submit <at> debbugs.gnu.org; Sat, 18 Feb 2023 18:22:09 -0500 Received: from mail-oa1-f46.google.com ([209.85.160.46]:35603) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>) id 1pTWWs-00063R-GI for 61506 <at> debbugs.gnu.org; Sat, 18 Feb 2023 18:22:07 -0500 Received: by mail-oa1-f46.google.com with SMTP id 586e51a60fabf-171ae278d41so1883660fac.2 for <61506 <at> debbugs.gnu.org>; Sat, 18 Feb 2023 15:22:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9Zzhbmkczxl16LTgSNHTqVn746CNtBHdYXYRuhJ8L0w=; b=H+Q2nxggRqR5lU3oUCBCNi0zRW2/MhGW7/8HX5xWt9XlJxevNIRfe0dBErumZZecLU GWlzp5PjlyEHLinh9uHsobzaOphumDZ+SFkCVf56kku9XcogxXafb26wFK5Szehk96h5 v6ZC4DRLu1vyDHWCHcds7MhD+SwfRnH/kTKzVUeqmU2bNdG8OdIM0/J99ZpP4YgbjKrs +Q5a6TgAPKt8U7dSd094eymsYHwrGQfxoJ7e+beelfzbSlRrvweWo6TY0bCJXVzfhjnO WwIL0fV4ubMoKfY0AWbM7MOq8kXN5GkJ3gKtiiPIcysDxFOoFPd1tfuyeI1EOjE2ISI1 NM2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9Zzhbmkczxl16LTgSNHTqVn746CNtBHdYXYRuhJ8L0w=; b=kpPnsJ1udrfxPxbwhU+eNJQ9OdqzCZHgIb09tQ7jfq0t6RDz+88FfSO+ocb+WmTP+L zUcjRXRHQQiFJD+ZgoyfHW4cs8Srrn5Ad9k43hYGrcf0g3v6HqXQqIPR72TsKDkcYy2g tf+l9K/Fp1JIGEhVx7LuofdH6nxLxAM9BCczbffZp2B1ptDTkovGiMT/09VsKSdnbIkK nAVt94CKa7smq1B80+3kzRoKE7zLBq87lMeQq2mP9I88JOoNrICpU04LCeONi9rqKO48 AROJA3AlSquKf4DmW/l24j/Ve3qCHC4H3JrsK+KPQ2YUfRQES3O21cOlMygrnc48WUST t62A== X-Gm-Message-State: AO0yUKX6MKxHS381wbvRkU4BV2W4rQ1BLl3cu1TLeR6aUR15NXa1Fhf/ Moqj/DDi+CFz+yeQDBQm9mqRqYLs4utdB1Gwc7Y= X-Google-Smtp-Source: AK7set+u1pPTg50+bNZ3u4vJFfy58nGmPOmEKuR1Reqfzs3ToPOp9Dmhrd57GbEp2h0LZXY6uk1AtIbZ+EneXq6Dtzk= X-Received: by 2002:a05:6870:d148:b0:16d:dc93:691d with SMTP id f8-20020a056870d14800b0016ddc93691dmr109019oac.6.1676762520743; Sat, 18 Feb 2023 15:22:00 -0800 (PST) MIME-Version: 1.0 References: <87h6vo1ph6.fsf@HIDDEN> <87pmacjl4l.fsf@HIDDEN> <74E0BF9F-42AF-4578-9681-D0FB936081AE@HIDDEN> <87v8k3st80.fsf@HIDDEN> <875yc3qf8n.fsf@HIDDEN> <87357262gf.fsf@HIDDEN> In-Reply-To: <87357262gf.fsf@HIDDEN> From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN> Date: Sat, 18 Feb 2023 23:23:41 +0000 Message-ID: <CALDnm52hnQLsprTwZZwNo=2sN=bS_=+xbpvvYLVQYRWetayzRg@HIDDEN> Content-Type: multipart/alternative; boundary="0000000000006bf3e905f501b29f" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --0000000000006bf3e905f501b29f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Feb 18, 2023 at 10:20 PM Theodor Thornhill <theo@HIDDEN> wrote: > > Ping :-) > > Presuming you meant to ping me, I'm not sure I can provide much more input at the moment. As I wrote, if someone is familiar with this part of the standard I'll be happy to review a patch adding this to Eglot. I share with Felician a concern: if the notification can be sent from the exit-function it's one thing, and the patch is possibly a one or two-liner. If, OTOH, the notification has to be sent after the didChange that follows a completion choice, then it's probably a much more complicated change. Jo=C3=A3o Jo~ao --0000000000006bf3e905f501b29f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"></div>On Sat, Feb 18, 2023 at 10:20 PM Th= eodor Thornhill <<a href=3D"mailto:theo@HIDDEN">theo@HIDDEN<= /a>> wrote:<br><div class=3D"gmail_quote"><blockquote class=3D"gmail_quo= te" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204= );padding-left:1ex"><br> Ping :-)<br> <br></blockquote><div><br></div><div>Presuming you meant to ping me, I'= m not sure I can provide much more input</div><div>at the moment.=C2=A0 As = I wrote, if someone is familiar with this part of the standard <br></div><d= iv>I'll be happy to review a patch adding this to Eglot.=C2=A0 <br></di= v><div><br></div><div>I share with Felician a concern: if the notification = can be sent from the exit-function <br></div><div>it's one thing, and t= he patch is possibly a one or two-liner.=C2=A0 If, OTOH, the notification <= br></div><div>has to be sent after the didChange that follows a completion = choice, then it's <br></div><div>probably a much more complicated chang= e.</div><div><br></div><div>Jo=C3=A3o<br></div><div><br></div><div>Jo~ao<br= ></div></div></div> --0000000000006bf3e905f501b29f--
X-Loop: help-debbugs@HIDDEN Subject: bug#61506: 30.0.50; [PATCH]: Send command in eglot completion exit-function Resent-From: Theodor Thornhill <theo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 20 Feb 2023 14:14:02 +0000 Resent-Message-ID: <handler.61506.B61506.167690242115496 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 61506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN> Cc: Felician Nemeth <felician.nemeth@HIDDEN>, 61506 <at> debbugs.gnu.org Received: via spool by 61506-submit <at> debbugs.gnu.org id=B61506.167690242115496 (code B ref 61506); Mon, 20 Feb 2023 14:14:02 +0000 Received: (at 61506) by debbugs.gnu.org; 20 Feb 2023 14:13:41 +0000 Received: from localhost ([127.0.0.1]:51088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pU6vF-00041r-5l for submit <at> debbugs.gnu.org; Mon, 20 Feb 2023 09:13:41 -0500 Received: from out-62.mta1.migadu.com ([95.215.58.62]:16034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <theo@HIDDEN>) id 1pU6vC-00041c-N2 for 61506 <at> debbugs.gnu.org; Mon, 20 Feb 2023 09:13:39 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1676902417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/Vr2UZ20yB2Syg3TZge54ex4tlh0iAfR93ZS2mGbiqo=; b=ZIJoouyUVE/Csr21oiUxcklyEBTmSLAzeqpgd4xxX0kCdFKv94F+U1hdlr7QdkMmkCCVHW t/ylsknctKN8lqgBArilGUdlvcNNLmiqh/lTa2r7s4IDsnsZ9WJct0hG+P3je03m9+RXIf 6Gilt2mRM6h+yhVV6bQu+uranR2JQfCcInU3HB1z+BnxmDZtPK9wJFu4as02iXd/OsN65Q ZKeg3dLtha/pGn9IxHVp5YjlJaSjMYKPC3a4qpoMyNjrLV7nFe4Nu8qgTzZk7oDRXa3Mx4 wP76wU70zWPyOyvWq+rEs9AcaplvqP34CnQhzQX90JRFIdB4wt+6KMi6wQ4ffg== From: Theodor Thornhill <theo@HIDDEN> In-Reply-To: <CALDnm52hnQLsprTwZZwNo=2sN=bS_=+xbpvvYLVQYRWetayzRg@HIDDEN> ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Sat, 18 Feb 2023 23:23:41 +0000") References: <87h6vo1ph6.fsf@HIDDEN> <87pmacjl4l.fsf@HIDDEN> <74E0BF9F-42AF-4578-9681-D0FB936081AE@HIDDEN> <87v8k3st80.fsf@HIDDEN> <875yc3qf8n.fsf@HIDDEN> <87357262gf.fsf@HIDDEN> <CALDnm52hnQLsprTwZZwNo=2sN=bS_=+xbpvvYLVQYRWetayzRg@HIDDEN> Date: Mon, 20 Feb 2023 15:13:36 +0100 Message-ID: <874jrga0hb.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Jo=C3=A3o T=C3=A1vora <joaotavora@HIDDEN> writes: > On Sat, Feb 18, 2023 at 10:20 PM Theodor Thornhill <theo@HIDDEN> wr= ote: > > Ping :-) > > Presuming you meant to ping me, I'm not sure I can provide much more input > at the moment. As I wrote, if someone is familiar with this part of the = standard=20 > I'll be happy to review a patch adding this to Eglot.=20=20 > > I share with Felician a concern: if the notification can be sent from the= exit-function=20 > it's one thing, and the patch is possibly a one or two-liner. If, OTOH, = the notification=20 > has to be sent after the didChange that follows a completion choice, then= it's=20 > probably a much more complicated change. > Yeah, the patch add this only to the exit-function, which also sends a didChange. No need to add this to anything else than the exit-function, I believe. Not sure whether you looked at the patch, but here it is inlined: ``` Send command in eglot completion exit-function * lisp/progmodes/eglot.el: Destructure optional argument command. (eglot-completion-at-point): Send command if supplied by server. 1 file changed, 4 insertions(+), 1 deletion(-) lisp/progmodes/eglot.el | 5 ++++- modified lisp/progmodes/eglot.el @@ -2925,7 +2925,7 @@ eglot-completion-at-point (window-buffer (minibuffer-selected-wi= ndow)) (current-buffer)) (eglot--dbind ((CompletionItem) insertTextFormat - insertText textEdit additionalTextEdits label) + insertText textEdit additionalTextEdits label = command) (funcall resolve-maybe (or (get-text-property 0 'eglot--lsp-item proxy) @@ -2965,6 +2965,9 @@ eglot-completion-at-point (when (cl-plusp (length additionalTextEdits)) (eglot--apply-text-edits additionalTextEdits))) (eglot--signal-textDocument/didChange) + (when command + (eglot--dbind ((Command) command arguments) command + (eglot-execute-command server (intern command) argument= s))) (eldoc))))))))) =20 (defun eglot--hover-info (contents &optional _range) ```
Received: (at control) by debbugs.gnu.org; 4 Sep 2023 09:01:57 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 04 05:01:57 2023 Received: from localhost ([127.0.0.1]:48600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qd5T3-00063I-Ew for submit <at> debbugs.gnu.org; Mon, 04 Sep 2023 05:01:57 -0400 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]:60636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>) id 1qd5T1-000631-Gz for control <at> debbugs.gnu.org; Mon, 04 Sep 2023 05:01:55 -0400 Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2be32d17f04so17545391fa.0 for <control <at> debbugs.gnu.org>; Mon, 04 Sep 2023 02:01:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693818110; x=1694422910; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=U2TdloaA2MpzMFfrXUVAlNyBv7JZRQzHy3QKHDniq9o=; b=ELCE4Ntd4PsP+6bkNXItvNEW69n0Dj+9AaA4UVGE65avKsICAGjIwHZjC1c6yNOeF9 K7KvTVQky33u7J4v4CUJU6yty5pVSmGVC/DYWWhP9r47SKTK1Fqqal01YG1N26bm/Hel 3F2HFRj7NloZ7fsXIbKmG34jcB+pc/hiyFujyhQQznsrQh6ByhiOSdyDbm+xx9VoxR3s Hhp526Jmrmu2xKzmLFKkvMfYU7MLlQSOJ7GDgHzsgrI5YhdF1awJBkOk1Nme1tko7mOw 1GLLEOkB73VUL+8zf07+60+YXM2V4ORiBw6LJRXVwGdRK2tZbEEo3n/u5jFZgWA26GgX 02DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693818110; x=1694422910; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=U2TdloaA2MpzMFfrXUVAlNyBv7JZRQzHy3QKHDniq9o=; b=Cllx19llFRZYx9r01AHT3FwkNMBJn0vfClcGeRncSsMr55m7I0il06ktSW8tFYMgks O/SDjuM8LqYNY3Rwt27iKAQDwua5W2ke+EeKSkovb8k6j47bEw5VUS9+HPBUa8WEshvc kK4DaVDO6wAb1tOf+1+6v7HqTadaCZyTUOSjsoJZfievLvJZ9eLxHWMUgsKcms2MyoKD sJ+fYQ6da2khJ9qaWVDFE0OCplZPt6pUA8f3T5ZwKfAd4cBEQDUojoncOBqNLMfg6YKW VS9ayLRYXPGe1kzfiFWcPI/33pUBbuclDOlitoUrLmJWoNYgMAZUuV/4gtZZmc/LS8yl SQSA== X-Gm-Message-State: AOJu0YzRQyfgTJVJywjONv5F9ce8BUYKcrx8QfFTNA1THzyiqzanoUlH pbzRQuVxr7NcAUy55GSSTh+Ejk9vvZ7hhCQFZyVbBjrOnqU= X-Google-Smtp-Source: AGHT+IE2TehTSgttCLIM3BnPaQaNru6OSfcmQHPS8OSSjWsQYx+C1SJRiMB0cN/wcuseskVUsapxvVQjTAHa0bUkb3k= X-Received: by 2002:a2e:9d10:0:b0:2b9:4413:864e with SMTP id t16-20020a2e9d10000000b002b94413864emr6322730lji.53.1693818109652; Mon, 04 Sep 2023 02:01:49 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 4 Sep 2023 02:01:49 -0700 From: Stefan Kangas <stefankangas@HIDDEN> MIME-Version: 1.0 Date: Mon, 4 Sep 2023 02:01:49 -0700 Message-ID: <CADwFkmmBKFi+Of_t3pdO+KfUE0Y4aZMEdHHXQHem6EwrB8XzcQ@HIDDEN> Subject: control message for bug #61506 To: control <at> debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) severity 61506 wishlist quit
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.