GNU bug report logs - #71642
30.0.50; eglot-execute doesn't support ExecuteCommandParams

Previous Next

Package: emacs;

Reported by: Troy Brown <brownts <at> troybrown.dev>

Date: Wed, 19 Jun 2024 03:25:02 UTC

Severity: normal

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Troy Brown <brownts <at> troybrown.dev>
Subject: bug#71642: closed (Re: bug#71642: 30.0.50; eglot-execute doesn't
 support ExecuteCommandParams)
Date: Sat, 22 Jun 2024 09:50:01 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#71642: 30.0.50; eglot-execute doesn't support ExecuteCommandParams

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 71642 <at> debbugs.gnu.org.

-- 
71642: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71642
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: João Távora <joaotavora <at> gmail.com>
Cc: jb <at> jeremybryant.net, brownts <at> troybrown.dev, 71642-done <at> debbugs.gnu.org
Subject: Re: bug#71642: 30.0.50;
 eglot-execute doesn't support ExecuteCommandParams
Date: Sat, 22 Jun 2024 12:48:52 +0300
> From: João Távora <joaotavora <at> gmail.com>
> Date: Sat, 22 Jun 2024 09:44:59 +0100
> Cc: Jeremy Bryant <jb <at> jeremybryant.net>, 71642 <at> debbugs.gnu.org
> 
> On Fri, Jun 21, 2024 at 2:51 PM João Távora <joaotavora <at> gmail.com> wrote:
> >
> > On Fri, Jun 21, 2024 at 1:14 PM Troy Brown <brownts <at> troybrown.dev> wrote:
> >
> > > I've updated the patch based on your suggestions.
> >
> > Looks good, thanks!
> >
> > The only doubt I have is the Copyright Assignment.  This is still a
> > "trivial" patch  (< 15 LOC), I think but I'll need to ask Eli for
> > his opinion to be sure.
> >
> > Eli, if you're OK with the copyright aspects, please install this
> > and close the bug.
> 
> Now actually copying in Eli.

Thanks, I installed this, and I'm therefore closing the bug.

Troy, if you want us to be able to accept your contributions in the
future, please consider starting the copyright assignment paperwork at
this time.  (If you agree, I will send you the form to fill and the
instructions to go with it.)

[Message part 3 (message/rfc822, inline)]
From: Troy Brown <brownts <at> troybrown.dev>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; eglot-execute doesn't support ExecuteCommandParams
Date: Tue, 18 Jun 2024 23:24:04 -0400
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.



This bug report was last modified 328 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.