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 09:12:39 +0100 Message-ID: References: <87y1x7pd53.fsf@gmail.com> <83v8sb73ga.fsf@gnu.org> <87tu7vpc8y.fsf@gmail.com> <83tu7v6kjv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000004ddf8005e31e84df" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19899"; 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 10:12:22 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 1o9090-00051w-Cb for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Jul 2022 10:12:22 +0200 Original-Received: from localhost ([::1]:44620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o908y-0000nu-Ot for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Jul 2022 04:12:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46012) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o908g-0000n3-Ny for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2022 04:12:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58284) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o908g-0005Wj-Da for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2022 04:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o908g-0003D0-5n for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2022 04:12:02 -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 08:12:02 +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.165709509912303 (code B ref 56407); Wed, 06 Jul 2022 08:12:02 +0000 Original-Received: (at 56407) by debbugs.gnu.org; 6 Jul 2022 08:11:39 +0000 Original-Received: from localhost ([127.0.0.1]:52181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o908J-0003CM-CP for submit@debbugs.gnu.org; Wed, 06 Jul 2022 04:11:39 -0400 Original-Received: from mail-oi1-f182.google.com ([209.85.167.182]:46818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o908H-0003C8-NT for 56407@debbugs.gnu.org; Wed, 06 Jul 2022 04:11:38 -0400 Original-Received: by mail-oi1-f182.google.com with SMTP id i3so19038894oif.13 for <56407@debbugs.gnu.org>; Wed, 06 Jul 2022 01:11:37 -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=6X/BFXynYlBfGMaI4HjlOhGYEZq5SAsw93l63Bangs0=; b=aNFoSJaUPy8ngvuZ0UzzA0izIzkRkOVagZAGVNEgSojq65gWb8dkL/RvIWMTmI6/L7 IiTG3cn14up/HBE2OwDQw/H5tPMTmsgroqQsjUPqek05EDsOtXqqfUhAJnjSRGd++h3x LRbPXGCEzjQKTGZqE3QMLqnHa7gdlYDlMfQvgsLLQhl6q6Pae+UFGj5n0l2ExMraaZRg 7R/VE38xWz+q9D/uZH/3Y/QQB+ZPY2bOwZrNOwr2m0XZHYIRMucpGMlVnLwsq7Md3Ajv UpfXRWqVSguoNWje6Nj9BcmzeTAb7Mkp+kgzqBzCE1LyllQqvklWn00uchGZVZjiJ7bY G80w== 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=6X/BFXynYlBfGMaI4HjlOhGYEZq5SAsw93l63Bangs0=; b=GVBknQND41ez9CQzSnYJuY+SWTBuRVHhuGOBb+xdUfrWWCAaKEu4Pdj35sZRQ4QsQg FywHXBm0GT2x5fmh925pEfGv0qlkLlAGCxf48NEJSdI/LY55i3s+srV73cABsu5z7jCa 546mfh4jgmU1Gy2fuiYmh46WQ85kUR9kgfNQoQJpe4E8yFbm9CWEHDHsdeq9xeeJBV39 d+Wj4XydrulskqYfObfq2sSbmeQN5hRFM+BcuXSflcuuemOGzxt6KvhlDk176BSV/Lhe e8f9sgn6V/9qm4/o5JJ71K6omgK5M5OF72uZ+kvUelorrx6VPk5seo0XEDLmOCU/Zg35 82DQ== X-Gm-Message-State: AJIora8E+X+kZLD25QAilQ+Zc8vbFOn7GIn2nA+CI9L/m3DgcZbwgTIW on7JEXH+nNwF9hfmYZd/4YB59yXuq+PWSkGITt6g8YMw X-Google-Smtp-Source: AGRyM1uMS3oUQWo7fFgnuWN7KqHGfyRMEo/MHY286snu9QbG7I3Kd6OygUbfNM1jtLWe7fSBIIIghDYh72NMaKYGf8w= X-Received: by 2002:aca:4b90:0:b0:335:b574:6108 with SMTP id y138-20020aca4b90000000b00335b5746108mr19834071oia.19.1657095091771; Wed, 06 Jul 2022 01:11:31 -0700 (PDT) In-Reply-To: <83tu7v6kjv.fsf@gnu.org> 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:236202 Archived-At: --0000000000004ddf8005e31e84df Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jul 6, 2022 at 3:29 AM Eli Zaretskii wrote: > > From: Jo=C3=A3o T=C3=A1vora > > Cc: 56407@debbugs.gnu.org, terra@diku.dk > > Date: Tue, 05 Jul 2022 20:53:33 +0100 > > > > Eli Zaretskii writes: > > > > >> 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. > > > > At first I thought it was a customization variable and that would make > > it user-specific overwritable etc. But I see now that evidently it is > > not. According to the docstring of d-m-m-handlers, eglot.el could just > > just contain the above invocation, indeed. > > > > But that has the downside that eglot.el must require "desktop.el" which > > IMO opinion too strongly couples the two packages. > > I see no reason to require: you just add a value to the list, that's > all. > Oh, it's an autoloaded variable. OK then, it'll work. It'll load in desktop.el though. > I think I like Lars's solution best. > > I don't: it makes the information spread out and harder to find. > Depends on whether one thinks using the global symbol table in Elisp is counts as "spread out". I don't. There's a nice upside to it, which is it prevents people like me not interested in desktop.el at all from having it autoloaded just by loading eglot.el. The things eglot.el is trying to say to desktop.el is "stay out of my minor mode" so it is strange that it has to pull in desktop.el every tim= e just to say that. Jo=C3=A3o T=C3=A1vora --0000000000004ddf8005e31e84df Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Jul 6, 2022 at 3:29 AM Eli Zarets= kii <eliz@gnu.org> wrote:
> From: Jo=C3=A3o T=C3=A1vora <joaotavora@gmail.com>
> Cc: 56407@d= ebbugs.gnu.org,=C2=A0 terra@diku.dk
> Date: Tue, 05 Jul 2022 20:53:33 +0100
>
> Eli Zaretskii <el= iz@gnu.org> writes:
>
> >> I confirmed this with a stack trace requested from the user a= nd came up
> >> with this workaround in the user's config:
> >>
> >>=C2=A0 =C2=A0 =C2=A0(add-to-list 'desktop-minor-mode-handl= ers
> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= '(eglot--managed-mode . ignore))
> >>
> >> This works, but we should come up with something better.
> >
> > But why is the above not good enough?=C2=A0 You could also use > > desktop-minor-mode-table, which is a defcustom.
>
> At first I thought it was a customization variable and that would make=
> it user-specific overwritable etc.=C2=A0 But I see now that evidently = it is
> not.=C2=A0 According to the docstring of d-m-m-handlers, eglot.el coul= d just
> just contain the above invocation, indeed.
>
> But that has the downside that eglot.el must require "desktop.el&= quot; which
> IMO opinion too strongly couples the two packages.

I see no reason to require: you just add a value to the list, that's all.

Oh, it's an autoloaded variabl= e.=C2=A0 OK then, it'll work. It'll load in desktop.el
though.

> I think I like Lars's solution best.

I don't: it makes the information spread out and harder to find.

Depends on whether one thinks using the globa= l symbol table in Elisp is
counts as "spread out". I do= n't.

There's a nice upside to it, whic= h is it prevents people like me not
interested in desktop.el= at all from having it autoloaded just by loading
=C2=A0eglot.el.= =C2=A0 The things eglot.el is trying to say to desktop.el is "stay out= of
my minor mode" so it is strange that it has to pull in d= esktop.el every time
just to say that.

Jo=C3=A3o T=C3=A1vora
--0000000000004ddf8005e31e84df--