From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii 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, 06 Jul 2022 15:48:53 +0300 Message-ID: <83let676fe.fsf@gnu.org> References: <87y1x7pd53.fsf@gmail.com> <83v8sb73ga.fsf@gnu.org> <87tu7vpc8y.fsf@gmail.com> <83tu7v6kjv.fsf@gnu.org> <83r12y7b0y.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24422"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56407@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 06 14:50:39 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 1o94UI-0006DH-Gz for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Jul 2022 14:50:38 +0200 Original-Received: from localhost ([::1]:52946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o94UG-0001aD-Oa for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Jul 2022 08:50:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o94Ti-0001Yw-Du for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2022 08:50:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58907) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o94Ti-0001k0-5P for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2022 08:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o94Th-000372-W6 for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2022 08:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Jul 2022 12:50: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.165711176011900 (code B ref 56407); Wed, 06 Jul 2022 12:50:01 +0000 Original-Received: (at 56407) by debbugs.gnu.org; 6 Jul 2022 12:49:20 +0000 Original-Received: from localhost ([127.0.0.1]:52804 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o94Ss-00035j-6J for submit@debbugs.gnu.org; Wed, 06 Jul 2022 08:49:19 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o94Sn-000359-4D for 56407@debbugs.gnu.org; Wed, 06 Jul 2022 08:49:08 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44746) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o94Sh-0001b3-Pm; Wed, 06 Jul 2022 08:48:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=fiEKE1vAvVwhWh0QMw4+/a4jC7oN3ur8ZQ6T1a8n4sQ=; b=enJ0s9RveZpKjkNvcbBk cuQIwrmaZIP9Dj4t0eLjzoLAqS+rsCEDucixwgPn5d1YikC7/du44wYrDwlbnZbUQbyYyWQ7wlLbc 9XmUXaPkJb8qu7+NkYhXe7Et2hwP2k3MNAKkexGgIMw80k1wQ796IufyCpe81cGayHsFGbBGwRCon jiLtUX4dtlgQ8lUM2ePpqr/dop98JUgqnZca8FlUTAa3HNSVAPNSUkyfEs13T26Z/c8cwTK4MIxkX +N4WJr8pYD/vty8SxtW0NZ4xvXZBXOuuqRXkDLzQAxwvgiogzqyXNI7UnSzD9HJ6uHaVwsQzkQdaq PyBF8yiRiu/5RA==; Original-Received: from [87.69.77.57] (port=1057 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o94Sg-0007O4-Uj; Wed, 06 Jul 2022 08:48:59 -0400 In-Reply-To: (message from =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= on Wed, 6 Jul 2022 12:30:28 +0100) 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:236231 Archived-At: > From: João Távora > Date: Wed, 6 Jul 2022 12:30:28 +0100 > Cc: 56407@debbugs.gnu.org > > I feel there's some misunderstanding here. What I meant is simply add > eglot--managed-mode to the default value of the variable in > desktop.el. Why would that require loading desktop.el? > > Indeed, I misunderstood. I thought you meant adding that to eglot.el. > > But then I'd say it is even worse, as you're informing desktop.el > about an implementation detail of eglot.el. If I change that minor > mode's name, then I have to change desktop.el as well. 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. > > > 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. > What do you mean by "global symbol table"? > > The obarray. That's not a source-level feature, so it doesn't help maintenance. > What I meant is that having all the modes which desktop.el treats > specially in one place in desktop.el makes it easier to find out which > modes are those, than if each of the modes had something like > "(put foo-mode 'desktop...)" in its own file. Because in the latter > case, if I want to know which modes are handled specially by desktop, > I'd need to search the entire tree. > > mapatoms is used all the time, it's fast and it can answer that. We are miscommunicating: I meant finding them without necessarily running Emacs. And mapatoms will only help if the corresponding package was loaded, it won''t help me to find all the packages that need something from desktop.el. > I think we use symbol properties very often and to good effect. For example > to describe the file-local safety of variables. Yes, and try finding, for example, all the possible uses of the 'delete-selection' property some day, for the purposes of documenting what can be done with each value of the property. > Conversely, putting the eglot-specific line > in desktop.el is putting eglot.el implementation details outside eglot.el, which > is bad. Not in my book, it isn't. desktop.el is by definition full of details about different Emacs features, and it is very nice to have them all in one place. > So, either way, using the desktop-minor-mode-table for this is a poor choice, > which logically means that the information should be stored in the symbol, > which exists in the global symbol table (the obarray). As someone who needs to look in desktop.el for similar details very frequently, I disagree, sorry.