GNU bug report logs -
#56407
29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use
Previous Next
Full log
Message #20 received at 56407 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> 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
This bug report was last modified 2 years and 347 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.