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

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

bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--mana


From: João Távora
Subject: bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use
Date: Tue, 05 Jul 2022 23:52:35 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>  Your change also precludes anyone to have such
> a mode restored, ever -- why?

I'm sorry, I realize I didn't answer this part of your email earlier.

eglot--managed-mode is a special minor mode: although the function is
created by define-minor-mode, it is not meant to be turned interactively
for example.  It needs certain preconditions to be true before turning
it on and off.  If this was all there it could perhaps be arranged with
some of those special function, but a very important detail here is that
these preconditions cannot be on per-buffer.  The most important of them
regards a connection to an LSP server which has a view over _all_
buffers in a certain major mode within a certain project.  Eglot has
machinery to carefully manage this, and I'm not sure it is easy or wise
to transfer or invoke that machinery in desktop.el's mode-restoring
functions.

Also, eglot--managed-mode is really an implementation detail that is
subject to change.  Not only theoretically, but practically, too, as I
ponder the ability to have more than one server active for any given
buffer at a time.

João





reply via email to

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