From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jeremy Bryant via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#71642: 30.0.50; eglot-execute doesn't support ExecuteCommandParams Date: Wed, 19 Jun 2024 22:19:17 +0100 Message-ID: <87v8243a22.fsf@jeremybryant.net> References: Reply-To: Jeremy Bryant Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35542"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71642@debbugs.gnu.org, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= To: Troy Brown Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 19 23:21:16 2024 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 1sK2k0-00094M-HF for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 19 Jun 2024 23:21:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sK2jk-00068f-Pq; Wed, 19 Jun 2024 17:21:00 -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 1sK2jj-00068S-GY for bug-gnu-emacs@gnu.org; Wed, 19 Jun 2024 17:20:59 -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 1sK2jj-0004QP-8A for bug-gnu-emacs@gnu.org; Wed, 19 Jun 2024 17:20:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sK2jm-00008s-Iu for bug-gnu-emacs@gnu.org; Wed, 19 Jun 2024 17:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jeremy Bryant Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Jun 2024 21:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71642 X-GNU-PR-Package: emacs Original-Received: via spool by 71642-submit@debbugs.gnu.org id=B71642.1718832005439 (code B ref 71642); Wed, 19 Jun 2024 21:21:02 +0000 Original-Received: (at 71642) by debbugs.gnu.org; 19 Jun 2024 21:20:05 +0000 Original-Received: from localhost ([127.0.0.1]:59657 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sK2iq-000071-Tn for submit@debbugs.gnu.org; Wed, 19 Jun 2024 17:20:05 -0400 Original-Received: from out-175.mta1.migadu.com ([95.215.58.175]:59820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sK2io-00006D-6i for 71642@debbugs.gnu.org; Wed, 19 Jun 2024 17:20:02 -0400 X-Envelope-To: joaotavora@gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeremybryant.net; s=key1; t=1718831959; 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=cC1gfpSt5zqux1ekAjrXFwd+KC2yFE2Qa6HcEx5lqPQ=; b=kjL9h5rMzXVzmKIlgGyiV+oEXUYc6AhLs+iUIZn5AITiNdLleMxrUWZNcMkYqjtIpeTuus DWci2p00Q/p52My7FZljYGLQKbnnsm94tWWCO575fCtiA28X8pWrDiIiSQ1OsfjlEaid2G fUdRxYBjc2kaZzSPF9a2Ly4vIDos32+IWap+QtaU9OQ6ibkOONm1FXQZUA/NTioNTa6pfo PomcHDfAmqefN8qhwA9eQ5qd/g1R7dLWlVnYnLrLMCctzc5cKsft0XzNORJTs2bjvFP+Xb iW1W0nyXI50RN40m/XwM9L622XWLrRfFnI4pyDaCzwCo8eRi3nNY/DHtypib6g== X-Envelope-To: 71642@debbugs.gnu.org X-Envelope-To: brownts@troybrown.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-Reply-To: (Troy Brown's message of "Tue, 18 Jun 2024 23:24:04 -0400") X-Migadu-Flow: FLOW_OUT 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:287513 Archived-At: Troy Brown writes: > With the deprecation of eglot-execute-command and its referral to > eglot-execute, it would seem that eglot-execute should support the > same command and arguments to send the workspace/executeCommand > request to the server. Unfortunately, this doesn't seem to work as > expected. I would have expected the following to work: > > (eglot-execute (eglot-current-server) '(:command "my-command")) > > The reason this doesn't work is because within eglot-execute, the use > of eglot--dcase is configured to only match Command or CodeAction. > Command requires that there be a "title" parameter, but this doesn't > exist in the workspace/executeCommand request. In fact, if the above > "eglot-execute" example is changed to add a ":title" parameter, it > will erroneously send a workspace/executeCommand with a title > parameter. > > The following example can be used to illustrate that the Command > interface (which is intended for code actions, not for sending an > executeCommand) doesn't match for this simple case: > > (condition-case err > (eglot--dcase '(:command "my-command") > (((Command)) (message "Matched command"))) > (error > (message "%s" (cdr err)))) > > It appears that an ExecuteCommandParams interface should be added to > eglot--lsp-interface-alist and that a matcher for ExecuteCommandParams > should be added to the eglot--dcase in eglot-execute. Additionally, > the Command matcher should be changed to not send the "title" > parameter in the subsequent workspace/executeCommand request. Adding Jo=C3=A3o as author of eglot