From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <87y1x7pd53.fsf@gmail.com> <83v8sb73ga.fsf@gnu.org> <87tu7vpc8y.fsf@gmail.com> <83tu7v6kjv.fsf@gnu.org> <83r12y7b0y.fsf@gnu.org> <83let676fe.fsf@gnu.org> <83h73u75bi.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000d5f22005e322daa4" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27149"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56407@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 06 15:23:19 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o94zv-0006xp-2M for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Jul 2022 15:23:19 +0200 Original-Received: from localhost ([::1]:41558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o94zt-00067z-Ay for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Jul 2022 09:23:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52866) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o94ze-00067g-7s for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2022 09:23:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58961) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o94zd-0005Tr-Va for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2022 09:23:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o94zd-00040q-RZ for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2022 09:23:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Jul 2022 13:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56407 X-GNU-PR-Package: emacs Original-Received: via spool by 56407-submit@debbugs.gnu.org id=B56407.165711373115361 (code B ref 56407); Wed, 06 Jul 2022 13:23:01 +0000 Original-Received: (at 56407) by debbugs.gnu.org; 6 Jul 2022 13:22:11 +0000 Original-Received: from localhost ([127.0.0.1]:52858 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o94yp-0003zh-Bt for submit@debbugs.gnu.org; Wed, 06 Jul 2022 09:22:11 -0400 Original-Received: from mail-oa1-f49.google.com ([209.85.160.49]:40464) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o94yn-0003zN-3F for 56407@debbugs.gnu.org; Wed, 06 Jul 2022 09:22:10 -0400 Original-Received: by mail-oa1-f49.google.com with SMTP id 586e51a60fabf-10c0e6dd55eso7530574fac.7 for <56407@debbugs.gnu.org>; Wed, 06 Jul 2022 06:22:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RgWMSMF3WnNP6kTM9HkQ5l/3faEnLDNT36N2MJE+h8I=; b=YPpYmV1UluEj/720sFLA5eYDfHw7nvuHP4tv465trYYVtx1ewywKwq0BHCse/1geWO K1etcz0+HsndFg+lBAOcnhj2Da7dBmrU1LD252MrXUu8A7DNkw8L/ZzuENQAMOOiTaVV TrY+sju3kQ6YR9ckXW/XEwtOCO428D4+ObcRJDVaz1Cjb1j6Z90Da1lrXwNTcCZZE5EK xgW7QHpzxnp0YYiDpPpxHnpAZ1z+q/z+LBJkVeN4DfqobPrqf4FbUWv0o3hFV5b8++hq 3ER3YsdoLubPMLoX+55iBQxbSvB3MtDqFDlpGTLd714hY3j4qUUNiS/I1LkaBxpVHEI/ 0Exg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RgWMSMF3WnNP6kTM9HkQ5l/3faEnLDNT36N2MJE+h8I=; b=B16V+Sw7MZKS03ycyh37oJv34f/SiI5qrTsFgHjae+NvJ9easElAzp4wbji0dWc2Ne /LySAW9qSYXfiNzGhAT1LtEhDdVc+bOkLVy5T9TOlHiBDZmfJ5e13RBSlm9nDHIN2Lvy efDLFNUuGCfsBPjFTKHT9d0tRXOZrYU++UnPu65IFKY7/kk/xB7Vfyb0oEpc9PwZP3Kx ETtuxzBkE0utU1DgS/cRa/oJLwZhgWKVRwvVJpPnOqJIT6OXnvJ8sEa6s5OzN3B1JdhL gshgVkprvlmYT2SMWRWN4Axuv/wsbC01+h6AWQKPUUJmuVU6hqU52v02niiniF/FA4YO w6pw== X-Gm-Message-State: AJIora8CcxrOXVA4MQIQumqwvEpCP88/UGXvscGIoAZtdEQvFRO+Ftz8 ZZ/JvXxoDhQDJQB7Gkwj9u64I+uvJ+B3eq5+ZxE= X-Google-Smtp-Source: AGRyM1uBPZodIhL0+Ho/rfdmcysaRDpQgLO9u1q4AZCVKVdBWKQqxk6J224kwrM5wViaOg21mYqZmDWieKyfbQCBsT4= X-Received: by 2002:a05:6870:51c6:b0:10c:2b7c:a542 with SMTP id b6-20020a05687051c600b0010c2b7ca542mr1240282oaj.19.1657113723399; Wed, 06 Jul 2022 06:22:03 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:236240 Archived-At: --000000000000d5f22005e322daa4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=C3=A3o On Wed, Jul 6, 2022 at 2:19 PM Jo=C3=A3o T=C3=A1vora = wrote: > On Wed, Jul 6, 2022 at 2:12 PM Eli Zaretskii wrote: > >> > From: Jo=C3=A3o T=C3=A1vora >> > 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=C3=A3o > --=20 Jo=C3=A3o T=C3=A1vora --000000000000d5f22005e322daa4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hmm,

I&= #39;ve just remembered there's yet another alternative which is to use<= /div>
=C2=A0
=C2=A0 (eval-after-load 'desktop
<= div>=C2=A0=C2=A0 ...)

=C2=A0in eglot.el. This woul= dn'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?).

Ju= st mentioning this for completeness sake.

Jo=C3=A3= o

On Wed, Jul 6, 2022 at 2:19 PM Jo=C3=A3o T=C3=A1vora <joaotavora@gmail.com> wrote:
On Wed, Jul 6, = 2022 at 2:12 PM Eli Zaretskii <eliz@gnu.org> wrote:
> From: Jo=C3=A3o T=C3=A1vora <joaotavora@gmail.com>
> Date: Wed, 6 Jul 2022 13:59:51 +0100
> Cc: 56407@d= ebbugs.gnu.org
>
>=C2=A0 That's okay: it's desktop.el's job to know about som= e implementation
>=C2=A0 details.=C2=A0 Just look at how much it knows about what the var= ious modes
>=C2=A0 and variables do in Emacs.
>
> Wait, you're saying it's "okay" to have to do a comm= it to Emacs's repo
> everytime someone makes a third-party package that has a minor mode > that needs special handling?=C2=A0 Or everytime someone changes the na= me
> or shape of a minor mode?

eglot is not a third-party package.=C2=A0 We intended to add it to core, I<= br> think?

Indeed we do.=C2=A0 But it's= not yet, because I've been so very busy.

=C2=A0But = if what I suggest isn't to your liking, you can always tell users
to customize desktop-minor-mode-table by themselves.=C2=A0 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.
=C2=A0
> But we do have that mechanism. It's called symbol properties and i= t's a nice
> feature of lisp. So let's use it, please.

If you insist.=C2=A0 But then don't come back crying when this is broke= n by
some change in desktop.el that the "loosely coupled packages" did= n'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 wa= ys.

I'll prepare a patch.
=C2=A0
Jo=C3=A3o


--
Jo=C3=A3o T=C3=A1vora
--000000000000d5f22005e322daa4--