unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 56407@debbugs.gnu.org
Subject: bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use
Date: Wed, 6 Jul 2022 14:23:11 +0100	[thread overview]
Message-ID: <CALDnm52Q24OL9RCMXT4SFWUcO3uy901j=sv2pcE_G_=R7CcUZA@mail.gmail.com> (raw)
In-Reply-To: <CALDnm52P9GEczqraXRMfxpO-uOx+sG5_5HPgG53_u-nMG8J=1A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2070 bytes --]

Hmm,

I've just remembered there's yet another alternative which is to use

  (eval-after-load 'desktop
   ...)

 in eglot.el. This wouldn't have the drawback of "load desktop.el
inadvertently".
Then again, eval-after-load shouldn't be used in packages, so I've read
somewhere
(manual?).

Just mentioning this for completeness sake.

João

On Wed, Jul 6, 2022 at 2:19 PM João Távora <joaotavora@gmail.com> wrote:

> On Wed, Jul 6, 2022 at 2:12 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
>> > From: João Távora <joaotavora@gmail.com>
>> > Date: Wed, 6 Jul 2022 13:59:51 +0100
>> > Cc: 56407@debbugs.gnu.org
>> >
>> >  That's okay: it's desktop.el's job to know about some implementation
>> >  details.  Just look at how much it knows about what the various modes
>> >  and variables do in Emacs.
>> >
>> > Wait, you're saying it's "okay" to have to do a commit to Emacs's repo
>> > everytime someone makes a third-party package that has a minor mode
>> > that needs special handling?  Or everytime someone changes the name
>> > or shape of a minor mode?
>>
>> eglot is not a third-party package.  We intended to add it to core, I
>> think?
>>
>
> Indeed we do.  But it's not yet, because I've been so very busy.
>
>  But if what I suggest isn't to your liking, you can always tell users
>
>> to customize desktop-minor-mode-table by themselves.  Or do what you
>> didn't want to do: cause desktop.el to be autoloaded by eglot.
>>
>
> Yes, those are alternatives. But not as good.
>
>
>> > But we do have that mechanism. It's called symbol properties and it's a
>> nice
>> > feature of lisp. So let's use it, please.
>>
>> If you insist.  But then don't come back crying when this is broken by
>> some change in desktop.el that the "loosely coupled packages" didn't
>> pick up.
>>
>
> Thanks. I can't vouch for my future emotions, but I also can't see how
> this mechanism, which I've used and seen used so often, could fail
> in such ways.
>
> I'll prepare a patch.
>
> João
>


-- 
João Távora

[-- Attachment #2: Type: text/html, Size: 3610 bytes --]

  reply	other threads:[~2022-07-06 13:23 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-05 19:34 bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use João Távora
2022-07-05 19:40 ` Eli Zaretskii
2022-07-05 19:53   ` João Távora
2022-07-06  2:29     ` Eli Zaretskii
2022-07-06  8:12       ` João Távora
2022-07-06 11:09         ` Eli Zaretskii
2022-07-06 11:30           ` João Távora
2022-07-06 11:37             ` Lars Ingebrigtsen
2022-07-06 12:48             ` Eli Zaretskii
2022-07-06 12:59               ` João Távora
2022-07-06 13:12                 ` Eli Zaretskii
2022-07-06 13:19                   ` João Távora
2022-07-06 13:23                     ` João Távora [this message]
2022-07-06 13:39                       ` Stefan Kangas
2022-07-06 13:47                         ` João Távora
2022-07-06 13:52                           ` Stefan Kangas
2022-07-06 13:52                           ` Lars Ingebrigtsen
2022-07-06 13:59                             ` João Távora
2022-07-05 22:52   ` João Távora
2022-07-06  2:34     ` Eli Zaretskii
2022-07-06  8:27       ` João Távora
2022-07-05 19:41 ` Lars Ingebrigtsen
2022-07-05 19:56   ` João Távora

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALDnm52Q24OL9RCMXT4SFWUcO3uy901j=sv2pcE_G_=R7CcUZA@mail.gmail.com' \
    --to=joaotavora@gmail.com \
    --cc=56407@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).