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: Tue, 05 Jul 2022 23:52:35 +0100 Message-ID: <87let7p3yk.fsf@gmail.com> References: <87y1x7pd53.fsf@gmail.com> <83v8sb73ga.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21302"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) 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 00:52:09 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 1o8rOr-0005Pe-Al for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Jul 2022 00:52:09 +0200 Original-Received: from localhost ([::1]:36438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8rOp-0006ho-V3 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Jul 2022 18:52:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54590) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8rOk-0006hg-3S for bug-gnu-emacs@gnu.org; Tue, 05 Jul 2022 18:52:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57992) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o8rOj-0007tl-RX for bug-gnu-emacs@gnu.org; Tue, 05 Jul 2022 18:52:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o8rOj-0005P7-Om for bug-gnu-emacs@gnu.org; Tue, 05 Jul 2022 18:52: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: Tue, 05 Jul 2022 22:52: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.165706150220746 (code B ref 56407); Tue, 05 Jul 2022 22:52:01 +0000 Original-Received: (at 56407) by debbugs.gnu.org; 5 Jul 2022 22:51:42 +0000 Original-Received: from localhost ([127.0.0.1]:51889 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8rOB-0005OK-1l for submit@debbugs.gnu.org; Tue, 05 Jul 2022 18:51:42 -0400 Original-Received: from mail-wr1-f49.google.com ([209.85.221.49]:36693) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8rO9-0005O8-K5 for 56407@debbugs.gnu.org; Tue, 05 Jul 2022 18:51:26 -0400 Original-Received: by mail-wr1-f49.google.com with SMTP id o4so19547655wrh.3 for <56407@debbugs.gnu.org>; Tue, 05 Jul 2022 15:51:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=Zc6Ass6N9+2WB+8s+DiRwMC5O1aEUAIFHew1Jxx8hiM=; b=DdRD011WG280dGSjSCnSJyhwNwSs60/Don5Yb4tMWQmPCxpVoq0bd2TlbbEJSfR2jb kqwiukp22ES/+41CYK0qmS0KvocRRQuZSdw05fXPJzanjYkHN431q75Rgy+GNBqTy6Qu HHyp3ciIjUsoiRbBDVF/4u3SfTvgW151AB69KmC/W5PhO2IFD4pVdARjZQQX6ghEt/Yb a0ArCG/PXnZDHJX0osTZHKqKuW5VlHiILwy09f8r6/15pWP9huX5QwbjVkwphYbd0XoO jGVx7bPibgdoMPiG/eX8CwOET8thrvuhPGxjpGmmub2DguaHVBy8eQv+JYN9zt+qEErZ wjIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=Zc6Ass6N9+2WB+8s+DiRwMC5O1aEUAIFHew1Jxx8hiM=; b=MeBDO1OOhyPeQnCAt0ZmD5HMM4Lne1gUp5LSXokMG1QYqbLctNA8LAqQCxKqZ6e0sg Aa7C52Tun3n2sdx+w0xA/ZdxSLBxFcrN4ev40Y5+BPq0dWIEMPS4Tr6Ge03URMbQJOnb FrGxoIs8dHnqoCLfuWilUYIZoiIXX1o6dHvGbwjaJgxx27V8ZENLqHblA+FWXEOYJ6IW ymgKD6FtZFOw7zSs1MRUPubAyo8J5rUyXqd/qlPOvRUukWBjC57TwLVD/lNmLEU7+JHr tLVeiQldxJ76rbDDZGwuiZCUtAukMrRNJENVtWDrfPQ1AbcbuaemrsLRTNQkilcoOXOx YgJA== X-Gm-Message-State: AJIora+u8ratdGUi2Td6mZWru8Keyco859ymbA4BTX1USIJyMQdFpjfD SDxhGjxZ3rzUbQ8H9R3ye2CjPNd9pL0= X-Google-Smtp-Source: AGRyM1u5PW7dLVrXzDSXOJqemLcgiVsWgxGidldgOeAWE9uoeFaNscxtaYpcU1BOhfDvfLn1kwGwYA== X-Received: by 2002:a5d:4ccd:0:b0:21d:7369:e3b3 with SMTP id c13-20020a5d4ccd000000b0021d7369e3b3mr5196702wrt.585.1657061479118; Tue, 05 Jul 2022 15:51:19 -0700 (PDT) Original-Received: from krug ([87.196.73.211]) by smtp.gmail.com with ESMTPSA id j8-20020a05600c190800b0039c5642e430sm26718636wmq.20.2022.07.05.15.51.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 15:51:18 -0700 (PDT) In-Reply-To: <83v8sb73ga.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 05 Jul 2022 22:40:53 +0300") 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:236187 Archived-At: Eli Zaretskii 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=C3=A3o