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 #8 received at 56407 <at> debbugs.gnu.org (full text, mbox):
> Cc: Morten Welinder <terra <at> diku.dk>
> From: João Távora <joaotavora <at> gmail.com>
> Date: Tue, 05 Jul 2022 20:34:16 +0100
>
> Hi Morten, maintainers,
>
> Recently, in https://github.com/joaotavora/eglot/issues/990, we found
> out that users of both eglot.el and desktop.el were getting errors when
> restarting Emacs. That's because desktop.el attempts to re-enable the
> eglot--managed-mode minor mode which was "on" when they saved the
> session (presumably on exit).
>
> I confirmed this with a stack trace requested from the user and came up
> with this workaround in the user's config:
>
> (add-to-list 'desktop-minor-mode-handlers
> '(eglot--managed-mode . ignore))
>
> This works, but we should come up with something better.
But why is the above not good enough? You could also use
desktop-minor-mode-table, which is a defcustom.
IOW, desktop.el already has the machinery to not restore some modes,
and I see no need to make a general change like you suggest just
because the mode in your case happened to have a symbol which looks
like an internal one. Your change also precludes anyone to have such
a mode restored, ever -- why?
> This probably works (though I haven't tested), but maybe we could come
> up with some other way around this, like having eglot.el propertize its
> 'eglot--managed-mode' symbol so that desktop.el doesn't even write it
> onto the user's save file. Or something like that.
Why invent new machinery, when we already have more than enough to
handle this problem (and many similar ones)?
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.