bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#58745: 29.0.50; eglot managed-major-mode must be a list


From: Stephen Leake
Subject: bug#58745: 29.0.50; eglot managed-major-mode must be a list
Date: Thu, 27 Oct 2022 10:51:40 -0700
User-agent: Gnus/5.13 (Gnus v5.13)

João Távora <joaotavora@gmail.com> writes:

> Yes, this has been discussed on emacs-devel and an equivalent patch
> pushed.
>
> So the bug can be closed.
>
> The function eglot doesn't have any non-interactive use that I can envision.
> Its INTERACTIVE argument is a historical remnant from a time where
> the function was called eglot-start-process.  Nevertheless, it makes sense
> that it converts the argument into a list.
>
> Stephen, I would advise against using eglot from Lisp, in principle
> but I haven't seen your use case

It will be in ada-mode 8.0, to be released soon; currently at

https://git.savannah.nongnu.org/cgit/ada-mode.git/tree/ada-eglot.el?h=org.emacs.ada-mode

I'm still fussing with it, but the core reason I'm calling eglot
directly is because the lsp server executable filename needs to be
computed at the time eglot is called, and eglot-workspace-configuration
needs to be let-bound to specify the project file used by the Ada lsp
server.

The first issue is mainly so I can change it easily to test alternate
versions/patches to the server; users may want to do the same, or even
use different versions with different projects. I could change exec-path
instead, but the current way seems cleaner.

The second issue should be fixed by using :initializeOptions instead,
but that's broken in the current Ada server. It still needs to be
computed on a per-project basis.

I could set elgot-server-programs with the locally-computed values, and
then use (call-interactively eglot), if you really want the args to
eglot to go away.

But I think calling eglot directly is more in keeping with the flavor of
ada-mode's use of it; it's just an alternative backend for various
features, not the primary user interface. 

-- 
-- Stephe





reply via email to

[Prev in Thread] Current Thread [Next in Thread]