From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 05 15:33:08 2022 Received: (at submit) by debbugs.gnu.org; 5 Jul 2022 19:33:08 +0000 Received: from localhost ([127.0.0.1]:51725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8oIG-0006dI-0u for submit@debbugs.gnu.org; Tue, 05 Jul 2022 15:33:08 -0400 Received: from lists.gnu.org ([209.51.188.17]:55516) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8oID-0006d8-KY for submit@debbugs.gnu.org; Tue, 05 Jul 2022 15:33:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49606) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8oID-0008L5-E6 for bug-gnu-emacs@gnu.org; Tue, 05 Jul 2022 15:33:05 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:38479) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o8oIA-0003rD-Og for bug-gnu-emacs@gnu.org; Tue, 05 Jul 2022 15:33:05 -0400 Received: by mail-wm1-x332.google.com with SMTP id g39-20020a05600c4ca700b003a03ac7d540so10320449wmp.3 for ; Tue, 05 Jul 2022 12:33:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=CwSCb+GVhKMhbMy8VhDbMSgGglXGf1JI1W70XUp8CaI=; b=DtF8KtrcrwsVIjDfB4djgu24BlTAJBgKsc9pRRpmBe6JG53LCdbOvTZ26ZbV5G3qqd 6srUE5CvR3WGd1jeI1Znd2ULjyTApcN76ocP4ZtfeOd/ctujCo6mDIeTv8T2wD6OUzyZ J/2KNwNUg9R0G20HII9D9fy2Rtz4093WRJ7ZAfpHyHYkBuw7Moy9As1AdL+REBleUewW Az94d3Fgstmisai47pYfPaa4CJbM+k9Si14oJwMmKFsUwZQMIR5GwoC98Mi8/9PUzL0J by2b4/bSD5cBJ8C/ifKBLeGbmW7lkc1CSb4LIjqfY5thPWHWGqX4Wvb2HjTElN93MW6Y ruUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=CwSCb+GVhKMhbMy8VhDbMSgGglXGf1JI1W70XUp8CaI=; b=vnq5oNr/bRFDsrz1KK5rlPvjHF4fz+f+Pl4R/WqhfMTUQZ15Fm3VcAhmn9i8fXaU8U KiYWis3qux3CFZlUAT5oUPecvv4mHImvD0ZPruplw74ai2ttFUjaGNcyHY8IYt9pqL2c wcRhq0Q/nab18JtaU0xiFJnpHO9tJby+Zsm/5a2t8u2R5X4ZyMumRIv6jhiaCFolisGJ Jtv5vyaUSBdEQcCHCwcMtGzHKjmoZ3vuB6ZWUuhksPhUpthwPQ8EhDTKTmDOtDhB29z9 r/XVCitDRAuLzF3VEooYAq4rssqeyqmQH18jLVqxQFTY0mLlik7vYGJGS6V5HSTIZ3Hs XN3Q== X-Gm-Message-State: AJIora8LUTWKJ0Qt+QU3LSkjyhXNdG8mCTPejAUFhKxV8HCyPdRa3ltS DaqEF6VhlXuvSLcC2xsovGbFCVE/zfA= X-Google-Smtp-Source: AGRyM1s7e9m/ih0cqp2+yOAfjbp5V4m4DVxwm5V/TVfmRiVH5ntlxQ6Kkcr7IYd7KkXxly0mMjBbng== X-Received: by 2002:a7b:ce8a:0:b0:3a1:8ead:2ae5 with SMTP id q10-20020a7bce8a000000b003a18ead2ae5mr24654839wmj.100.1657049580448; Tue, 05 Jul 2022 12:33:00 -0700 (PDT) Received: from krug ([87.196.73.211]) by smtp.gmail.com with ESMTPSA id k6-20020a5d6286000000b0021d6e14a9ccsm4510850wru.16.2022.07.05.12.32.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 12:32:59 -0700 (PDT) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: bug-gnu-emacs@gnu.org Subject: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use X-Debbugs-CC: Morten Welinder Date: Tue, 05 Jul 2022 20:34:16 +0100 Message-ID: <87y1x7pd53.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=joaotavora@gmail.com; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi Morten, maintainers, Recently, in https://github.com/joaotavora/eglot/issues/990, we found out that users of both eglot.el and desktop.el were getting errors when restarting Emacs. That's because desktop.el attempts to re-enable the eglot--managed-mode minor mode which was "on" when they saved the session (presumably on exit). 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. In Eglot, the eglot--managed-mode minor mode is an implementation detail, it is NOT meant to be called by the user, since it requires a number of preconditions (like firing up a successful server) to be met. Therefore, I have named the symbol with the "internal symbol" convention. In this very simple patch, I teach desktop.el to watch out for this convention and not restart that mode. diff --git a/lisp/desktop.el b/lisp/desktop.el index 1a4103e209..a93703a77e 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -1617,7 +1617,9 @@ desktop-create-buffer (let ((handler (cdr (assq minor-mode desktop-minor-mode-handlers)))) (if handler (funcall handler desktop-buffer-locals) - (when (functionp minor-mode) + (when (or (functionp minor-mode) + (and (symbolp minor-mode) + (not (string-match "^[^-]+--" (symbo= l-name minor-mode))))) (funcall minor-mode 1))))))) ;; Even though point and mark are non-nil when written by ;; `desktop-save', they may be modified by handlers wanting to set This probably works (though I haven't tested), but maybe we could come up with some other way around this, like having eglot.el propertize its 'eglot--managed-mode' symbol so that desktop.el doesn't even write it onto the user's save file. Or something like that. Thanks, Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 05 15:41:11 2022 Received: (at 56407) by debbugs.gnu.org; 5 Jul 2022 19:41:11 +0000 Received: from localhost ([127.0.0.1]:51748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8oQ3-0006qQ-6M for submit@debbugs.gnu.org; Tue, 05 Jul 2022 15:41:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8oQ1-0006po-78 for 56407@debbugs.gnu.org; Tue, 05 Jul 2022 15:41:10 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42430) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8oPt-00059I-1g; Tue, 05 Jul 2022 15:41:01 -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=r7mHrJmBKcNEM65WZ4H3Y+7AQvcRi+xZu6qqH8kavKs=; b=UQkuw+ZxwXTb+2V4zQVM 7T5IBciKao2/cPBwtnwEicVpYpyUMtSLQC6rffBzAW0p/cBgJVAuM6JqkIrLNJhHKGEu0/JJaFnc5 TGMQ2rKGftLnHh/yp+Y9OPkxsBhT4+oDTVvm+ej4jIvkPe00n0Nf4Rlrmn3bMHzwAJ+/a2et+Dv2e Xx6bEKyVZQa9y6gPILgJJQGGnN6poR3HxvSxo5bbUJW0FZ4czYpWLlXGDMvX6Zj7tSHdroFtVVIHZ eD4TOxTtu85D0I2pZr6WZhXz8lSQEGT9DDH8o89dGBGobrBIib6Z1Jib/+JxTj3gvxu2/N2wfttMh myAD/PTfYmKH2g==; Received: from [87.69.77.57] (port=1879 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 1o8oPs-0002Vk-HJ; Tue, 05 Jul 2022 15:41:00 -0400 Date: Tue, 05 Jul 2022 22:40:53 +0300 Message-Id: <83v8sb73ga.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= In-Reply-To: <87y1x7pd53.fsf@gmail.com> (message from =?utf-8?B?Sm/Do28g?= =?utf-8?B?VMOhdm9yYQ==?= on Tue, 05 Jul 2022 20:34:16 +0100) Subject: Re: bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use References: <87y1x7pd53.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56407 Cc: terra@diku.dk, 56407@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: Morten Welinder > From: João Távora > Date: Tue, 05 Jul 2022 20:34:16 +0100 > > Hi Morten, maintainers, > > Recently, in https://github.com/joaotavora/eglot/issues/990, we found > out that users of both eglot.el and desktop.el were getting errors when > restarting Emacs. That's because desktop.el attempts to re-enable the > eglot--managed-mode minor mode which was "on" when they saved the > session (presumably on exit). > > 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. IOW, desktop.el already has the machinery to not restore some modes, and I see no need to make a general change like you suggest just because the mode in your case happened to have a symbol which looks like an internal one. Your change also precludes anyone to have such a mode restored, ever -- why? > This probably works (though I haven't tested), but maybe we could come > up with some other way around this, like having eglot.el propertize its > 'eglot--managed-mode' symbol so that desktop.el doesn't even write it > onto the user's save file. Or something like that. Why invent new machinery, when we already have more than enough to handle this problem (and many similar ones)? From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 05 15:41:22 2022 Received: (at 56407) by debbugs.gnu.org; 5 Jul 2022 19:41:22 +0000 Received: from localhost ([127.0.0.1]:51751 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8oQE-0006qt-Hk for submit@debbugs.gnu.org; Tue, 05 Jul 2022 15:41:22 -0400 Received: from quimby.gnus.org ([95.216.78.240]:47552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8oQC-0006qb-KZ for 56407@debbugs.gnu.org; Tue, 05 Jul 2022 15:41:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=BXbQxzBJadglJqFN/dh98nHNH+ePVKFDgdxB+PyWu3A=; b=rKiP8JqM8lCMrIErW7tDzFIX77 bPtUcckRntQnXqmgiSVkYALhfEoOnDwce3vojLHJ24E6lKd9rDen6ovz6c+HKgdCDkkzDvUneM2lS jPbmYNUZRcsskKOUx6CgO26TOHLM2JL3lVMYPNr9HSpnVWeeY47yJJnfm0J07exVRgk4=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o8oQ3-0005DK-0R; Tue, 05 Jul 2022 21:41:13 +0200 From: Lars Ingebrigtsen To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use In-Reply-To: <87y1x7pd53.fsf@gmail.com> (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vor?= =?utf-8?Q?a=22's?= message of "Tue, 05 Jul 2022 20:34:16 +0100") References: <87y1x7pd53.fsf@gmail.com> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAKlBMVEVlABtpDCVyJzta BxxUFyZULTZaVVZMPkFYO0JYRkpTSUthYGBoNUP///8BXNtuAAAAAWJLR0QN9rRh9QAAAAd0SU1F B+YHBRMnM/JCsEcAAAC3SURBVDjLY2AY1ECQURAEMCWUFJWUhJSUBAbagTQEzC4uBtjEWULcSkKw SXi4dk4NCcaiIXhq1lYPd0wJDrf0tJ1hUwMwJCKnrZrSsWzaYgyJ7oxZW6IzZ6ZgSHTujJx8OmL1 VAyJiM6pFiYzI0IxJKJcd86emuaKqcM1dYa3cWrmRAwJ0+i01pnZKQ2YHgxNa3ZLi8QSWqFuu9JS W7AFYlTVsuUOWIPXFXuwD38ggEvCYaBdhgAAbGIulyOF3ToAAAAldEVYdGRhdGU6Y3JlYXRlADIw MjItMDctMDVUMTk6Mzk6NTErMDA6MDCDUVqqAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTA3LTA1 VDE5OjM5OjUxKzAwOjAw8gziFgAAAABJRU5ErkJggg== X-Now-Playing: King Crimson's _Discipline_: "Frame by Frame" Date: Tue, 05 Jul 2022 21:41:10 +0200 Message-ID: <877d4rmjop.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: João Távora writes: > This probably works (though I haven't tested), but maybe we could come > up with some other way around this, like having eglot.el propertize its > 'eglot--managed-mode' symbol so that desktop.el doe [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56407 Cc: Morten Welinder , 56407@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Jo=C3=A3o T=C3=A1vora writes: > This probably works (though I haven't tested), but maybe we could come > up with some other way around this, like having eglot.el propertize its > 'eglot--managed-mode' symbol so that desktop.el doesn't even write it > onto the user's save file. Or something like that. Yes, I think it'd be better to add a mechanism like (put 'eglot--managed-mode 'desktop-inhibit t) or the like, and get rid of (defcustom desktop-minor-mode-table '((defining-kbd-macro nil) (isearch-mode nil) (vc-mode nil) ... which is used for the same thing. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 05 15:52:24 2022 Received: (at 56407) by debbugs.gnu.org; 5 Jul 2022 19:52:24 +0000 Received: from localhost ([127.0.0.1]:51764 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8oau-00079z-6Y for submit@debbugs.gnu.org; Tue, 05 Jul 2022 15:52:24 -0400 Received: from mail-wm1-f42.google.com ([209.85.128.42]:38844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8oas-00079g-IL for 56407@debbugs.gnu.org; Tue, 05 Jul 2022 15:52:23 -0400 Received: by mail-wm1-f42.google.com with SMTP id g39-20020a05600c4ca700b003a03ac7d540so10347063wmp.3 for <56407@debbugs.gnu.org>; Tue, 05 Jul 2022 12:52:22 -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=AlIAF4gqJ2aAURiu8Sj23J2Iw+9lnBhB4RPh7voYbeM=; b=eHUICjwJa0Vxqzta02TxAVeMTW0tAq+sQTxIpJxw/CS8qqXlyYpZROZeS9CKHBCsmk /TyWmE0Y4JSHRStffFPLS6pCrWpau92YGXF85FBSsjyi1yjLVb06OItTuEF7fy9eIM+U 5mRMwu7G1p9Z58Irdi6z6GR6BIcKkkrSJ/dJdpQwOo9ofoxWOziwr83YO2tKnHrtFAej hai1uQ27QSjrvV2WhiWm5OMuY7VVRCLKJHVVZDLrAak+dZ4mCilhqZ17Xz+LAWJJqNcP P7sFFSCvKyUkNNkvPdYsYiRDGzcHijk9JpiZf/L0xDb6YXKku9XHwp8zU8eLtLc95CGN /IAA== 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=AlIAF4gqJ2aAURiu8Sj23J2Iw+9lnBhB4RPh7voYbeM=; b=RVoDvYx4plM+PvrS1LTNyTNxntFg0owVuaZYMZ580f4DLNh60KPhDoqmoX7xulwJ5I m/IyTsIOoeXthK9IiVt5dGWSlUSlfHhXadriVgWCku418iw7GbjnEwpNwNj8bf6CAbkG q/kmWVUUB5FlRu3icC6GFzzIMFOsVKFFMkscr0BSwXKW3Vtte3qKRVWmEpalMz4wDPyb vTCknPbztP5asQWxj81fICCWSYdYHsN5WUbbE78Th2+Q/dEdk4/u5IZXv4aH4rDA/7WH K+C8O2YypupF2i5bGJI5WUgY00fChiwfr5jPcH9JRWSX4fxsozpNfi63p4Ko+m3q9JPU Nhow== X-Gm-Message-State: AJIora9aWwZD3XnqZkf66BbbJGrIqnpE+aSIA7hMgnsCcJZAT7SHD92V wOnC56C5KDLp6QjKyeZjw6w= X-Google-Smtp-Source: AGRyM1tR45juzrZIGwKNA5hi1Ou2WBXGrkpX9ka8N8lx6PvyhMDwr//L70GNakeqtNpApxFUzP5Mfg== X-Received: by 2002:a05:600c:4fc8:b0:3a1:987c:82d4 with SMTP id o8-20020a05600c4fc800b003a1987c82d4mr18875724wmq.26.1657050736518; Tue, 05 Jul 2022 12:52:16 -0700 (PDT) Received: from krug ([87.196.73.211]) by smtp.gmail.com with ESMTPSA id x12-20020a5d650c000000b0021d7050ace4sm3227563wru.77.2022.07.05.12.52.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 12:52:16 -0700 (PDT) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Eli Zaretskii Subject: Re: bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use References: <87y1x7pd53.fsf@gmail.com> <83v8sb73ga.fsf@gnu.org> Date: Tue, 05 Jul 2022 20:53:33 +0100 In-Reply-To: <83v8sb73ga.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 05 Jul 2022 22:40:53 +0300") Message-ID: <87tu7vpc8y.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 56407 Cc: terra@diku.dk, 56407@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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: >>=20 >> (add-to-list 'desktop-minor-mode-handlers >> '(eglot--managed-mode . ignore)) >>=20 >> 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 think I like Lars's solution best. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 05 15:55:37 2022 Received: (at 56407) by debbugs.gnu.org; 5 Jul 2022 19:55:37 +0000 Received: from localhost ([127.0.0.1]:51773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8oe0-0007F9-S3 for submit@debbugs.gnu.org; Tue, 05 Jul 2022 15:55:37 -0400 Received: from mail-wr1-f50.google.com ([209.85.221.50]:42662) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8ody-0007Eu-0U for 56407@debbugs.gnu.org; Tue, 05 Jul 2022 15:55:35 -0400 Received: by mail-wr1-f50.google.com with SMTP id s1so19026520wra.9 for <56407@debbugs.gnu.org>; Tue, 05 Jul 2022 12:55:33 -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=y25AbWieGlp0tKXTfexpmeRb5949a8kFQdvsXt6/FVI=; b=SzIdonF0UWUkMSh7x3Blr8a10GynpW6atA/lC+4OralKY+e8NM1aYA8wQlIA346wbG H1jpxO1+7JQ4Ol/GD8gZwvuz2LIGdCc9MR6X1CaawT4wpK19jfyZQfciOZh7ukxAqMkQ YCxelcx1JWv8H90M9YdQD1X0V/a9+75/vaSdfZf3FLNpmkRDM4OI/vY5theQfRe/2trb h6LU9D4nPdDI4Kn97b2fvf0qL+9tcPz5ZE1pell4MixzvRj9HE4FrLW9flUbxGWAaAEk W1ytSMpzZ7d4ZgRe95BZQQNC0yWnShboHBvIjQvEcEiNswvRBtR/+Hy24FWR1QXpNhfG MN1A== 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=y25AbWieGlp0tKXTfexpmeRb5949a8kFQdvsXt6/FVI=; b=jhaCMZ53aWd+dyfz7rhnH7e6xB7k/3nbH3oXF5ts1l3zMW7zQwnEuIA1WmdeVHJ07J Kk3UAX9IvEuYNRf/2JLx5sNLitqjDBSdR6wKuJaXCYZ02aH20q7M43e5g00pzpcoJYRW Zko2LjcMCgxF1o55ZNxlFozD2i1dWgVafY1F6j3vUKq25XUvshqdDhjArRhPBnX1INvj +0yhnr9iaDRDvMBu/hWkfaV2RsFtLu9CM2t9n5gYFtL6adETfE4UNS9b642nmIkgov90 ATbRngVtY8EH0h51iEsgZnAcXBVXroIRX+Dh2eSv6uj1zC0Lk/OXOi8Yh0ydx5ZxBhaU xtEA== X-Gm-Message-State: AJIora9KrG7UsiA/0Xhvl5CYzf3Ygejp/zFp0ediubdb7dOSEiLNZJ3O siXxN4L/aI+JCwMqsV0cWiA= X-Google-Smtp-Source: AGRyM1tU3s+7sT+8fqo3SxDebh/dzYZzLrHIUAeY3sact9ozDfcmEpJb+v3aVsg2XWdYX2ryC1WPTg== X-Received: by 2002:a05:6000:1c06:b0:21d:60ea:e757 with SMTP id ba6-20020a0560001c0600b0021d60eae757mr16953390wrb.418.1657050928228; Tue, 05 Jul 2022 12:55:28 -0700 (PDT) Received: from krug ([87.196.73.211]) by smtp.gmail.com with ESMTPSA id v7-20020adfa1c7000000b0021d6924b777sm7273153wrv.115.2022.07.05.12.55.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 12:55:27 -0700 (PDT) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Lars Ingebrigtsen Subject: Re: bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use References: <87y1x7pd53.fsf@gmail.com> <877d4rmjop.fsf@gnus.org> Date: Tue, 05 Jul 2022 20:56:45 +0100 In-Reply-To: <877d4rmjop.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 05 Jul 2022 21:41:10 +0200") Message-ID: <87pmijpc3m.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 56407 Cc: Morten Welinder , 56407@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > Yes, I think it'd be better to add a mechanism like > > (put 'eglot--managed-mode 'desktop-inhibit t) Yes, I think I like this solution best. Some desktop.el-agnostic name that conveys "implementation-detail" would be even better, IMO. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 05 18:51:42 2022 Received: (at 56407) by debbugs.gnu.org; 5 Jul 2022 22:51:42 +0000 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 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 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) 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) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Eli Zaretskii Subject: Re: bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use References: <87y1x7pd53.fsf@gmail.com> <83v8sb73ga.fsf@gnu.org> Date: Tue, 05 Jul 2022 23:52:35 +0100 In-Reply-To: <83v8sb73ga.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 05 Jul 2022 22:40:53 +0300") Message-ID: <87let7p3yk.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 56407 Cc: 56407@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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 From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 05 22:29:32 2022 Received: (at 56407) by debbugs.gnu.org; 6 Jul 2022 02:29:32 +0000 Received: from localhost ([127.0.0.1]:51973 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8unE-0002ED-6c for submit@debbugs.gnu.org; Tue, 05 Jul 2022 22:29:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51110) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8unA-0002Dz-65 for 56407@debbugs.gnu.org; Tue, 05 Jul 2022 22:29:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58756) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8un2-0001ud-SR; Tue, 05 Jul 2022 22:29:21 -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=aEZfX5/oyZzOK7CBXoRxv7Yvn287D6iYCfQju1OfqoM=; b=VfM4Ug2gnV+vDGVmt1fl ARLTr3v5Uwf/EcFghia6m4PveNapGlUL2gSoK3D4LIJapUJh08dxhprH9Txaqv/je1PM3E44dWF3I SVdUFjSA2M9FYdAO+dtyKGrtcSvq9xKSw7HeoQEW4D/bvNuZySVsdH/VZKdiC3cDHx3i3XyDlcB5n 7afFJrn9O4TPCjHqqSL43wuo4lw9Ms6w2pjM0qyTzmIbq0wOgySgzoNq079DUhPku2001RJHZXYze HXleFRUIr07EzV0DROGorVWUMMy6Mxx4vzPhLewaDoTsi3cUHe45PRVTkWdiCicz6Fh5AtdOpHaeB r/9/C/qczm0mnw==; Received: from [87.69.77.57] (port=3022 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 1o8umx-00015k-Da; Tue, 05 Jul 2022 22:29:17 -0400 Date: Wed, 06 Jul 2022 05:29:08 +0300 Message-Id: <83tu7v6kjv.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= In-Reply-To: <87tu7vpc8y.fsf@gmail.com> (message from =?utf-8?B?Sm/Do28g?= =?utf-8?B?VMOhdm9yYQ==?= on Tue, 05 Jul 2022 20:53:33 +0100) Subject: Re: bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use References: <87y1x7pd53.fsf@gmail.com> <83v8sb73ga.fsf@gnu.org> <87tu7vpc8y.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56407 Cc: terra@diku.dk, 56407@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: João Távora > 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. > I think I like Lars's solution best. I don't: it makes the information spread out and harder to find. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 05 22:34:41 2022 Received: (at 56407) by debbugs.gnu.org; 6 Jul 2022 02:34:41 +0000 Received: from localhost ([127.0.0.1]:51979 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8usC-0002NG-S4 for submit@debbugs.gnu.org; Tue, 05 Jul 2022 22:34:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51840) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8usB-0002N4-E2 for 56407@debbugs.gnu.org; Tue, 05 Jul 2022 22:34:39 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58956) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8us3-00047D-M6; Tue, 05 Jul 2022 22:34:32 -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=9FwMlRDm1moP/JuR8Bb+J4ukJhvrzSn6b+9nvKxqav8=; b=MwGh2460yyasO5Z1NBsY h3qZuuVqzH2/4sirtHpjvjcqnd/hD8mlEZ6VKSwAchbOw4haqrN7VJJWh1UA3z8O6b40RuhdIoAL0 UKUjebxM1yvoXDB9KrE6WQKXUV/ZvidcMmgXdl6j1es3ECGt32PMj8FI/mOvfu0kgtWFCqMHN1B/3 lHMLNmepKDxQgPU9is6aO8hJJPOvQMpyh1JLuL3oYorJVPCeExl+6ZTKYpPbig6KolqeapDZpvrRl KP32QUImr7Hs8vplwkJSoY2QIrYWNmvTIBwLX+RNUqYGBv8GJm/77fa1utgJ8Ww/A08Xbvm16d3rk zH/zprETf4KchQ==; Received: from [87.69.77.57] (port=3321 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 1o8urj-0008Es-Mr; Tue, 05 Jul 2022 22:34:17 -0400 Date: Wed, 06 Jul 2022 05:34:06 +0300 Message-Id: <83sfnf6kbl.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= In-Reply-To: <87let7p3yk.fsf@gmail.com> (message from =?utf-8?B?Sm/Do28g?= =?utf-8?B?VMOhdm9yYQ==?= on Tue, 05 Jul 2022 23:52:35 +0100) Subject: Re: bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use References: <87y1x7pd53.fsf@gmail.com> <83v8sb73ga.fsf@gnu.org> <87let7p3yk.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56407 Cc: 56407@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: João Távora > Cc: 56407@debbugs.gnu.org > Date: Tue, 05 Jul 2022 23:52:35 +0100 > > 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: I meant _any_ mode that has "--" in its symbol, not just eglot--managed-mode. I don't want to preclude restoration of any such modes, from now to eternity, it's too heavy a promise to make. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 06 04:11:39 2022 Received: (at 56407) by debbugs.gnu.org; 6 Jul 2022 08:11:39 +0000 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 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 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) MIME-Version: 1.0 References: <87y1x7pd53.fsf@gmail.com> <83v8sb73ga.fsf@gnu.org> <87tu7vpc8y.fsf@gmail.com> <83tu7v6kjv.fsf@gnu.org> In-Reply-To: <83tu7v6kjv.fsf@gnu.org> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Wed, 6 Jul 2022 09:12:39 +0100 Message-ID: Subject: Re: bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use To: Eli Zaretskii Content-Type: multipart/alternative; boundary="0000000000004ddf8005e31e84df" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 56407 Cc: 56407@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --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-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 06 04:26:10 2022 Received: (at 56407) by debbugs.gnu.org; 6 Jul 2022 08:26:10 +0000 Received: from localhost ([127.0.0.1]:52206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o90MM-0003ay-7A for submit@debbugs.gnu.org; Wed, 06 Jul 2022 04:26:10 -0400 Received: from mail-oa1-f46.google.com ([209.85.160.46]:35774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o90MK-0003ak-NH for 56407@debbugs.gnu.org; Wed, 06 Jul 2022 04:26:09 -0400 Received: by mail-oa1-f46.google.com with SMTP id 586e51a60fabf-10be0d7476aso13641244fac.2 for <56407@debbugs.gnu.org>; Wed, 06 Jul 2022 01:26:08 -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=z/ueSs7F7+AsyreicCdaButG88rBH1/kOge3MUwz6Jg=; b=AV5f60XUTYqWv9++26s0q6lId6Y2GfRg8yx6sQKgTQTYy2CILSlaxhm/WgUyDCMyBF Lu9QR3JDxGxcjRWQoQrIQuVjVX0/qzItvMdYPs25b0IjE+LZjbk3ARS3capIe/i/5jVE quw7hKtN7+ZOwHWwSToJ5oL9ec9GrURsm3SdlFyYjiklbUmS9KsgC7uux4ykg53t5JeG Ycei9cX5PNv8qukh2jUIP8MDfBxxBAFh0N7qnsIMz+ADgIMk9y4Xwi2YmhVoiyKkPYEf x7TBJ0AMJZTJZUDwKv2XLOZBYv8ZBnavec1QlLb83aotZpyRd8KbZaJNwBF6WJOXF+OD GP4w== 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=z/ueSs7F7+AsyreicCdaButG88rBH1/kOge3MUwz6Jg=; b=1Oxhb+8kYvTx4MGbLgdzRYdfR15KL1W83DyIdR+9LuyhWh/4hEBIy4EbbSd4rOtOTR sUZjZ17ftErcQVtWdSE5kLv+kpK4ndGOilAt0BDn9rqO5VsJrMpd2etPMAD6vgxm+s0k NRdCwULDZlJ17bYcGI3i6HUPB0aMK9eDavq5IDbVFvkktsAmBcjwQuAvY+blu+4wk2UC bG8piQ43go0jqqxSDvJj8vLXYnZWDqvsiVNoiZfE8AEgAWKirbXUkrquwu1p0c2Tlf2F eIuuGD6z+Zxw/imyf8UtPsY1dffUZu033WFJHx0ABupWpIyS2a21kXIYwtAEBiTki/5C bwqA== X-Gm-Message-State: AJIora9eSDqHNeE+1K4ssBGBKj7GNSXZW8EvcVVHgebVGtXY3zAqjwL1 NAmUBiZ3LOJ3E5bMDzRVmfWxAGJpMaZzv/6waC8= X-Google-Smtp-Source: AGRyM1sF3tqEArYf7qR30SOzWk/yHIojTljAffW68dSZ2iVeN1mnrDsKekSjCreBeqHVRnfJN5+bjhh1U1ArdAZEgsQ= X-Received: by 2002:a05:6870:8925:b0:fe:4638:dc01 with SMTP id i37-20020a056870892500b000fe4638dc01mr24894777oao.209.1657095962516; Wed, 06 Jul 2022 01:26:02 -0700 (PDT) MIME-Version: 1.0 References: <87y1x7pd53.fsf@gmail.com> <83v8sb73ga.fsf@gnu.org> <87let7p3yk.fsf@gmail.com> <83sfnf6kbl.fsf@gnu.org> In-Reply-To: <83sfnf6kbl.fsf@gnu.org> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Wed, 6 Jul 2022 09:27:10 +0100 Message-ID: Subject: Re: bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use To: Eli Zaretskii Content-Type: multipart/alternative; boundary="0000000000003461ea05e31eb897" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 56407 Cc: 56407@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000003461ea05e31eb897 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jul 6, 2022 at 3:34 AM Eli Zaretskii wrote: > > From: Jo=C3=A3o T=C3=A1vora > > Cc: 56407@debbugs.gnu.org > > Date: Tue, 05 Jul 2022 23:52:35 +0100 > > > > 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: > > I meant _any_ mode that has "--" in its symbol, not just > eglot--managed-mode. I don't want to preclude restoration of any such > modes, from now to eternity, it's too heavy a promise to make. > I think there are no promises made on those modes anyway, because they are implementation details, by their authors' definition. But I agree it's not the prettiest kludge. Jo=C3=A3o --0000000000003461ea05e31eb897 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Jul 6, 2022 at 3:34 AM Eli Zarets= kii <eliz@gnu.org> wrote:
> From: Jo=C3=A3o T=C3=A1vora <joaotavora@gmail.com>
> Cc: 56407@d= ebbugs.gnu.org
> Date: Tue, 05 Jul 2022 23:52:35 +0100
>
> Eli Zaretskii <el= iz@gnu.org> writes:
>
> >=C2=A0 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 e= arlier.
>
> eglot--managed-mode is a special minor mode:

I meant _any_ mode that has "--" in its symbol, not just
eglot--managed-mode.=C2=A0 I don't want to preclude restoration of any = such
modes, from now to eternity, it's too heavy a promise to make.

I think there are no promises made on those mod= es anyway,
because they are implementation details, by their= authors'
definition.

But I agree it's not the prettiest kludge.

J= o=C3=A3o

--0000000000003461ea05e31eb897-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 06 07:09:48 2022 Received: (at 56407) by debbugs.gnu.org; 6 Jul 2022 11:09:48 +0000 Received: from localhost ([127.0.0.1]:52628 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o92ui-0008Tp-7g for submit@debbugs.gnu.org; Wed, 06 Jul 2022 07:09:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55884) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o92uf-0008Ta-JS for 56407@debbugs.gnu.org; Wed, 06 Jul 2022 07:09:47 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42948) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o92ua-0007BL-CD; Wed, 06 Jul 2022 07:09:40 -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=vv4mwXut5LqlPDvFkXmzS/Pdn5p1Yh0ei4Z3F6FhQLA=; b=O+XW9Shr5WZCOBNBQxZS s7lgdyRhTpnnLNPMtfwlAHvONv5xi82dEYoKgsMl5vAfG380mAW9d0XXJPu3FN28WiWnKIAbJaDhz 6JGhNe1bYme6TzgW/BZHaap5qxvLM+rS+Kuq/suNW1vNx3BHOzdzo1v+gSn9C5xUm1yEdH3xDIFOX e8ZDiFowUbQyBVDZ/0RXIfACOqVmkq+mdUM9QvCHbbu9lpvR9c5MwR2gpE4JqeaVS8S/j/RkGdNTp RlTK19s2AB3eJAtWpwwBujUU7xcoMNWlh4hfJNKW2T2OtbH3hWoA+Zl6biZvLbjt1BO/tFk0+CsZn Agf89XOX1Xk+8w==; Received: from [87.69.77.57] (port=2917 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 1o92uZ-0000YB-Sg; Wed, 06 Jul 2022 07:09:40 -0400 Date: Wed, 06 Jul 2022 14:09:33 +0300 Message-Id: <83r12y7b0y.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= In-Reply-To: (message from =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= on Wed, 6 Jul 2022 09:12:39 +0100) Subject: Re: bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use References: <87y1x7pd53.fsf@gmail.com> <83v8sb73ga.fsf@gnu.org> <87tu7vpc8y.fsf@gmail.com> <83tu7v6kjv.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56407 Cc: 56407@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: João Távora > Date: Wed, 6 Jul 2022 09:12:39 +0100 > Cc: 56407@debbugs.gnu.org > > 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 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? > > 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"? 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. > 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 time > just to say that. See above: I don't think I understand why would you need to load desktop.el. The variable desktop-minor-mode-table is of interest only when the desktop is saved or restored, and at that time desktop.el is already loaded, of course. No other code anywhere else should need to consult desktop-minor-mode-table. Or what am I missing? From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 06 07:29:29 2022 Received: (at 56407) by debbugs.gnu.org; 6 Jul 2022 11:29:29 +0000 Received: from localhost ([127.0.0.1]:52671 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o93Dk-0002m0-H7 for submit@debbugs.gnu.org; Wed, 06 Jul 2022 07:29:28 -0400 Received: from mail-ot1-f45.google.com ([209.85.210.45]:44686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o93Dh-0002lj-UU for 56407@debbugs.gnu.org; Wed, 06 Jul 2022 07:29:26 -0400 Received: by mail-ot1-f45.google.com with SMTP id m24-20020a0568301e7800b00616b5c114d4so11600205otr.11 for <56407@debbugs.gnu.org>; Wed, 06 Jul 2022 04:29:25 -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=e13im42bzhuUDPoNVYOvO0GO+mMA0EUpR5E/mr6hSdo=; b=pwsgPWu/ZY418je1sJsHn2Uqx995paqkFJVuMDKNEUTwhprvvfHTAQFBtTaDlqOnjt cf4q5OyCPkw1QTw8YsXf6OxCbVoYzAQ35JLgKAReFCMJyBiHUJgFF3kNSjAK/wNce3x/ orYBC5KB24zNQAno7SraZvEzECJMN8LNOt029LCLYlPMMVvNgt8jzbX1AKb6V55qCQI9 4firWcUB7DezrIm36T6yokLk8ANfsMz+YLnAbbj/cVvr1Nc4m0QXTmqYy9+WaQy6qjNG KtJg+DESYwWYpsxQi6NL28podLTpsYdsxzfArV5EsRe1VgAF3NVW+SvSb3JSM+Z5GBuw cgsQ== 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=e13im42bzhuUDPoNVYOvO0GO+mMA0EUpR5E/mr6hSdo=; b=qiILiKtF2lw9dPokqXUU35Lhi5S6KjwefEIUEzhaNmm3+tCefCySk5jG0u3vGgCawg VOw/TKPPCfIUKJb+G5ULSHz19/URzejPL/jD2eJHpJKOcRzgq6UegD2c0t2HR05BsOKe jbr5FJ0iydP+BK+z38xeBRA9n92JJhA8R3tGMwKa4KEWRouC+kOY6KcffrzDx4Cpv2iy YBDa3TYaKxAw2V1t1JWpy4JABAdD5Hps4h46TpGFXPjnm0Doep92fD3Mf9/DOQe8Jaj4 9AvCX2nDp1rTfL7BbZ9KwYZMVk4utPY/TOtsVJBBnCXEwulWVuT3pjb/azMwmdlGeXAg PZLg== X-Gm-Message-State: AJIora9PYE0MKzGf9bgVxnXk4b5RGlXx1B5rlyHuK0+5mB1ol69cYznl zf+SrUW0cbSAV3Vy5vsnbR+tX5wmRGm9woxh/yk= X-Google-Smtp-Source: AGRyM1vb/WItpSGVB+bg3Ka86aYl8No2zk02VNtrBlbTWv1x2YJkIKRzSa6xdBD7LnwJ6wGn1A3bou+p9yprytyxJ+o= X-Received: by 2002:a9d:4e91:0:b0:616:8273:76e6 with SMTP id v17-20020a9d4e91000000b00616827376e6mr17061067otk.340.1657106960138; Wed, 06 Jul 2022 04:29:20 -0700 (PDT) MIME-Version: 1.0 References: <87y1x7pd53.fsf@gmail.com> <83v8sb73ga.fsf@gnu.org> <87tu7vpc8y.fsf@gmail.com> <83tu7v6kjv.fsf@gnu.org> <83r12y7b0y.fsf@gnu.org> In-Reply-To: <83r12y7b0y.fsf@gnu.org> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Wed, 6 Jul 2022 12:30:28 +0100 Message-ID: Subject: Re: bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use To: Eli Zaretskii Content-Type: multipart/alternative; boundary="000000000000b6c66905e321475b" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 56407 Cc: 56407@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000b6c66905e321475b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jul 6, 2022 at 12:09 PM Eli Zaretskii wrote: > > Oh, it's an autoloaded variable. OK then, it'll work. It'll load in > desktop.el > > though. > > 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. > > 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. 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. But typically I think, the question would be: "Why isn't this mode X being handled as I expect it to?", and then the answer would be easy. Except that even that question is hard to conceive in this particular case: why would someone be concerned about `eglot--managed-mode`, if it's an implementation detail? I think we use symbol properties very often and to good effect. For exampl= e to describe the file-local safety of variables. > > 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 loadi= ng > > 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 > time > > just to say that. > > See above: I don't think I understand why would you need to load > desktop.el. The variable desktop-minor-mode-table is of interest only > when the desktop is saved or restored, and at that time desktop.el is > already loaded, of course. No other code anywhere else should need to > consult desktop-minor-mode-table. Or what am I missing? > See above. I thought you meant putting the line into eglot.el which would work but needs loading desktop.el. Conversely, putting the eglot-specific line in desktop.el is putting eglot.el implementation details outside eglot.el, which is bad. 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). Interestingly, a hook variable doesn't have this drawback, btw. In fact, they seem to have been designed to avoid this class of problems. But d-m-m-table is not a hook variable. Jo=C3=A3o T=C3=A1vora --000000000000b6c66905e321475b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Jul 6, 2022 at 12:09 PM Eli Zaretskii <eliz@gnu.org> wrote:
=C2=A0
> Oh, it's an autoloaded variable.=C2=A0 OK then, it'll work. It= 'll load in desktop.el
> though.

I feel there's some misunderstanding here.=C2=A0 What I meant is simply= add
eglot--managed-mode to the default value of the variable in
desktop.el.=C2=A0 Why would that require loading desktop.el?

Indeed, I misunderstood. I thought you meant adding t= hat to eglot.el.

But then I'd say it is even w= orse, as you're informing desktop.el
about an implementa= tion detail of eglot.el.=C2=A0 If I change that minor
mode&#= 39;s name, then I have to change desktop.el as well.=C2=A0
<= /div>

>=C2=A0 > I think I like Lars's solution best.
>=C2=A0 I don't: it makes the information spread out and harder to f= ind.
> Depends on whether one thinks using the global symbol table in Elisp i= s
> counts as "spread out". I don't.
What do you mean by "global symbol table"?
<= br>
The obarray.

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.=C2=A0 Because i= n 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.

But typically I think, the question would be: "= ;Why isn't this mode X being
handled as I expect it to?"= , and then the answer would be easy.=C2=A0 Except
that even that = question is hard to conceive in this particular case: why would
<= div>someone be concerned about `eglot--managed-mode`, if it's an
implementation detail?

I think we use sym= bol properties very often and to good effect.=C2=A0 For example
t= o describe the file-local safety of variables.
=C2=A0
> There's a nice upside to it, which is it prevents people like me n= ot
> interested in desktop.el at all from having it autoloaded just by load= ing
>=C2=A0 eglot.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 desktop.el= every time
> just to say that.

See above: I don't think I understand why would you need to load
desktop.el.=C2=A0 The variable desktop-minor-mode-table is of interest only=
when the desktop is saved or restored, and at that time desktop.el is
already loaded, of course.=C2=A0 No other code anywhere else should need to=
consult desktop-minor-mode-table.=C2=A0 Or what am I missing?

See above. I thought you meant putting the line into= eglot.el which would
work but needs loading desktop.el. Converse= ly, putting the eglot-specific line
in desktop.el is putting eglo= t.el implementation details outside eglot.el, which
is bad.
=

So, either way, using the desktop-minor-mode-table for = this is a poor choice,
which logically means that the inform= ation should be stored in the symbol,
which exists in the gl= obal symbol table (the obarray).

Interestingly= , a hook variable doesn't have this drawback, btw.=C2=A0 In fact,
<= /div>
they seem to have been designed to avoid this class of problems. = But
d-m-m-table is not a hook variable.

<= div dir=3D"ltr" class=3D"gmail_signature">Jo=C3=A3o T=C3=A1vora
--000000000000b6c66905e321475b-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 06 07:37:21 2022 Received: (at 56407) by debbugs.gnu.org; 6 Jul 2022 11:37:21 +0000 Received: from localhost ([127.0.0.1]:52698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o93LN-0005C2-2X for submit@debbugs.gnu.org; Wed, 06 Jul 2022 07:37:21 -0400 Received: from quimby.gnus.org ([95.216.78.240]:54102) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o93LL-0005Bn-Et for 56407@debbugs.gnu.org; Wed, 06 Jul 2022 07:37:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ZqldDMazlAEwKzsQvOoH3G1B21YDJs78atFaFSSUJh8=; b=rrKR5lbwN+k2FB7DSAQ5UoYP5U EQ7ZKCmfagqnWTrT7806Sz/oNUAe78U+4JOjzkyHQtDPbJn8jj2jm4jhG4YBxF7dafjI7BjVa6v8H 7lrEAXJSZZpsdjxaufXVqNAsu2+45w8foBmmRv5Oz5xIXjqhJ5U8ire8x9bKkH60yZiM=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o93LC-0004kV-Fo; Wed, 06 Jul 2022 13:37:12 +0200 From: Lars Ingebrigtsen To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use In-Reply-To: (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vora=22's?= message of "Wed, 6 Jul 2022 12:30:28 +0100") References: <87y1x7pd53.fsf@gmail.com> <83v8sb73ga.fsf@gnu.org> <87tu7vpc8y.fsf@gmail.com> <83tu7v6kjv.fsf@gnu.org> <83r12y7b0y.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEU8LjurpJ+SamPy 8e3///9OwGRvAAAAAWJLR0QEj2jZUQAAAAd0SU1FB+YHBgsaFD0gELQAAAF4SURBVDjLhZON0ewg CEWRNCDYAJIGNPbf2wOMu+7f95jdGeMBgSsC/DJaC7VfZcmMqnW0J0BEKZVTNqBn3oMTJz6KR6ju QJSh0Oio+AKwCUIl7QexqgD/r6o0Nmt21HeQBMpXgAJ15abNMvxh4xgj9zLquKxWrV5rzQtYS2lc anKh7aN1cYNIfpG3zLKBBooGCoMBFZ0gOZAJ5ANAdeCy0tJ2AvSIMwC/Aq/q9D3/ywPIBF2nPUBm sKOaJxdE68ZB+SWJAQHqZEfZoKiPi+KMQK/aqwI0EB95RUxJEjqy3OFa5r6BVh0QlU7yls+mBESw LNeR4z6vN7fjAdRHCW265ulPUOlHxHkBCVcfBq9ri2BYy5L35IXeQfuIqC8RVsy9bPXXyGn0q0to 96ULyd5QDG08uHRNEKLLVKsE6DdwF4gB4u4q2HUGyNWBXy6Sae15xEFm9a7xrorYdVvJQ8r9LUaE 6rb5YZE0Xs/zokY/XKsW4yLfwXf7B+AAVYKTs451AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIyLTA3 LTA2VDExOjI2OjIwKzAwOjAwbK271QAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0wNy0wNlQxMToy NjoyMCswMDowMB3wA2kAAAAASUVORK5CYII= X-Now-Playing: Latin Quarter's _Mick and Caroline_: "The Man Below" Date: Wed, 06 Jul 2022 13:37:09 +0200 Message-ID: <87y1x6jwuy.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: João Távora writes: > I think we use symbol properties very often and to good effect. For example > to describe the file-local safety of variables. Yes, I think they're ideal for this sort of thing -- loosely coupled interaction between two packages. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56407 Cc: Eli Zaretskii , 56407@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Jo=C3=A3o T=C3=A1vora writes: > I think we use symbol properties very often and to good effect. For exam= ple > to describe the file-local safety of variables. Yes, I think they're ideal for this sort of thing -- loosely coupled interaction between two packages. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 06 08:49:20 2022 Received: (at 56407) by debbugs.gnu.org; 6 Jul 2022 12:49:20 +0000 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 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 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==; 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 Date: Wed, 06 Jul 2022 15:48:53 +0300 Message-Id: <83let676fe.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= In-Reply-To: (message from =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= on Wed, 6 Jul 2022 12:30:28 +0100) Subject: Re: bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use 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 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56407 Cc: 56407@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 06 08:58:50 2022 Received: (at 56407) by debbugs.gnu.org; 6 Jul 2022 12:58:50 +0000 Received: from localhost ([127.0.0.1]:52820 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o94cE-0003Kc-H6 for submit@debbugs.gnu.org; Wed, 06 Jul 2022 08:58:50 -0400 Received: from mail-oa1-f53.google.com ([209.85.160.53]:35806) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o94cC-0003KL-Ge for 56407@debbugs.gnu.org; Wed, 06 Jul 2022 08:58:48 -0400 Received: by mail-oa1-f53.google.com with SMTP id 586e51a60fabf-10be0d7476aso14403588fac.2 for <56407@debbugs.gnu.org>; Wed, 06 Jul 2022 05:58:48 -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=wB0FqptYAX6+dL7kio9+VsT+HXJk1ohNVH1c8yFc6Uc=; b=dgOjhojUA0EuDeq9x5s4mlf9zb1u27iBjElfD2ginLjHz9LRE7IeHu+8x76S7fTUDV JCjWv+oVCRhWzy2oiQ3CYqm6M/EBFKNbQvE/bxFTi2+vIc2KdAERIdwgfBwvojPLJElN GBvO1DeRLznOeUDaaPv8L+4hHZdJyhZV+d+/UXFSfvCxdYXWgQMsjLhG2iK4gyIgBJNV 8ZMERDwlP/WwLen2faiEGIfZLP9/A5HdN5N7QRmLJEBdLkqK9DTqy5Ls0I/koKEpToR1 8L03xEZcPBP7NikAjMSE1213aF5mn7SVGU+yhUCa0+qUlaRYo0tAz36hBQf/Ve7/jUVk ZAoQ== 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=wB0FqptYAX6+dL7kio9+VsT+HXJk1ohNVH1c8yFc6Uc=; b=StzFy6F6l4zZNHZ9q7FCDzWQmvf3IekirsYNTAsLIMtsqCLmEQQ5HSO+VpmTo0S76Q 0Ngp/21VCMPgoXX2c4Wjup1Z337V7x+CZpxTrCf1rj+PrBNZswoLkMJRJUkXQJa55REp CHBPW/AcFI7CBk+jxAsxxRzYTfCO/5Bnx5rI/88G23GkRTEX6YkJyheo0jmYtafxg9rf ILoFqQhN5cByu3iXr59CB6nKERTPFbiKhXH797y8tZOlvguUghLhZeN919dZDg1qOg9K iLMXaaSVG2JUICBcTjE0QDj7t4VfCRKJI/2ACSnaWxAW1cCpRnNAzcI37RXjG9T+/omz l7zg== X-Gm-Message-State: AJIora9dl40lLgHWpVK/IvnK4l1OMdVCoQxgoagrfkdfGc8qr/J5pq4W l7WjhuGX0jheMvfZKgx1E5icILQOpInee433i0oTlvDI X-Google-Smtp-Source: AGRyM1ulmC7b/lrOY4sn7VYrhtfRfL6kvWiHfEXzrFAECEvKlpOAUzvJVmR8JJtlydvmItFpn2pBl5dyJSuXzKBXh60= X-Received: by 2002:a05:6870:8925:b0:fe:4638:dc01 with SMTP id i37-20020a056870892500b000fe4638dc01mr25702814oao.209.1657112322745; Wed, 06 Jul 2022 05:58:42 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: <83let676fe.fsf@gnu.org> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Wed, 6 Jul 2022 13:59:51 +0100 Message-ID: Subject: Re: bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use To: Eli Zaretskii Content-Type: multipart/alternative; boundary="00000000000059aabe05e3228762" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 56407 Cc: 56407@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000059aabe05e3228762 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > > > 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. 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? I can't possibly see how this is okay. There should simply be a generic mechanism for minor-modes to tell desktop.el and other intrusive packages to "stay out of my minor mode". But we do have that mechanism. It's called symbol properties and it's a nic= e feature of lisp. So let's use it, please. All the other solutions are demonstrably worse. I'm not even saying to get rid of d-m-m-table, as Lars is. I'm just saying: let's not type "name-of-eglot-symbol-that-joao-may-want-to-change" into desktop.el. It's really a hazard. Jo=C3=A3o --00000000000059aabe05e3228762 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> But then I'd say it is even worse, as you're informing desktop= .el
> about an implementation detail of eglot.el.=C2=A0 If I change that min= or
> mode's name, then I have to change desktop.el as well.=C2=A0

That's okay: it's desktop.el's job to know about some implement= ation
details.=C2=A0 Just look at how much it knows about what the various modes<= br> and variables do in Emacs.

Wait, you&= #39;re saying it's "okay" to have to do a commit to Emacs'= ;s repo
everytime someone makes a third-party package that h= as a minor mode
that needs special handling?=C2=A0 Or everyt= ime someone changes the name
or shape of a minor mode?
=
I can't possibly see how this is okay. There should simp= ly be a generic
mechanism for minor-modes to tell desktop.el and = other intrusive
packages to "stay out of my minor mode&= quot;.=C2=A0

But we do have that mechanism. I= t's called symbol properties and it's a nice
feature of l= isp. So let's use it, please. All the other solutions are demonstrably<= /div>
worse.=C2=A0 I'm not even saying to get rid of d-m-m-table, a= s Lars is.=C2=A0 I'm just
saying: let's not type &qu= ot;name-of-eglot-symbol-that-joao-may-want-to-change"=C2=A0
=
into desktop.el.=C2=A0 It's really a hazard.

Jo=C3=A3o
--00000000000059aabe05e3228762-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 06 09:13:04 2022 Received: (at 56407) by debbugs.gnu.org; 6 Jul 2022 13:13:04 +0000 Received: from localhost ([127.0.0.1]:52838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o94q0-0003jT-G4 for submit@debbugs.gnu.org; Wed, 06 Jul 2022 09:13:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o94px-0003iy-JQ for 56407@debbugs.gnu.org; Wed, 06 Jul 2022 09:13:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45542) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o94ps-0003SG-7i; Wed, 06 Jul 2022 09:12:56 -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=nOKMElOAbh+ykDrPfZaTUvpHv2Z1650BpaFPMbtSso8=; b=ZwnMeodkDMDzaZE2Zw3g /2jF7wrUdf5ETrwW/SH4IiwtN2SL9kILbeQxrCajBIMi5KIgBGxhv/T6zZPR35up+ztxTXd69v9bJ 0mFkh51UvS/NtK7UNrxA0jK/xTz7PhRo+tqmM9sEYQof783moeq7+iVNiX/DlUfBs9GogYAyl01V2 OvHsLJG8J1Y8xhrwy4VsHIBp6SLUReUg3JAPf8koRpYwsia8kBNaoIO2QF3HbpBNZ70RjjuXC5M8D F2OGmH9yGn7iCN6OK/23rsAuqiMSMvprw+XpjbcHH5wHabiDzLNNLsvSrQE8I4RLNsXMbndTwkxMf SkiV09QPTHoc+A==; Received: from [87.69.77.57] (port=2524 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 1o94pr-0005RK-EA; Wed, 06 Jul 2022 09:12:55 -0400 Date: Wed, 06 Jul 2022 16:12:49 +0300 Message-Id: <83h73u75bi.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= In-Reply-To: (message from =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= on Wed, 6 Jul 2022 13:59:51 +0100) Subject: Re: bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use 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> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56407 Cc: 56407@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: João Távora > 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? 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. > 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. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 06 09:18:43 2022 Received: (at 56407) by debbugs.gnu.org; 6 Jul 2022 13:18:43 +0000 Received: from localhost ([127.0.0.1]:52854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o94vS-0003tO-Mi for submit@debbugs.gnu.org; Wed, 06 Jul 2022 09:18:43 -0400 Received: from mail-ot1-f43.google.com ([209.85.210.43]:38758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o94vR-0003tA-Ex for 56407@debbugs.gnu.org; Wed, 06 Jul 2022 09:18:41 -0400 Received: by mail-ot1-f43.google.com with SMTP id cb12-20020a056830618c00b00616b871cef3so11806793otb.5 for <56407@debbugs.gnu.org>; Wed, 06 Jul 2022 06:18:41 -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=OvzR0YzTtFcd6IITISp6cc4u1wz4WXuZbpS8sobOaCc=; b=RWaJMLFQ5bnFsVrcX7y/H/MwTfyHSrO7BP/Yl+7ZMAwBOPCI0m0IwDEf0pxwaqKYD4 /ztiHDRO9njeg/XiBdyAyXh9vVJsbfdCa+NgfMhw8FJNjmxamFPp3U/01tCj5va8PKm2 eO7Ffv+5UbUAGITOaD2v93YkDmSwDLN9H/fyNGktAn4bcRwJLk6OWmKeuF6QI0pHUOAX b+Hl1m9b1ECHVpjvdWrrGSHz5sns5gf/mz2l9Sqnf7disjSRzSDnSN+wZFqePcy4vdex dGdJ5Mos6EwumJeErbcXbByUqdjP5oOlyHYr6WNNDeLZMWBSsahWt44GO0FMH0zuryfQ bBZQ== 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=OvzR0YzTtFcd6IITISp6cc4u1wz4WXuZbpS8sobOaCc=; b=eqZQX78XoSaWVToLjB15jfH0EcuF/b7TZUJFtxnJVlmF8CEsxCSVAv3isXinlF3W3b HIzo9gg1K3btmzG5k2cc5aeDDuF226cjPKyl0fB0g919UkIwvEDpSCqTq13KcOd7cigF 7itkP64DVw3TwtriNx0P6tSbvc2KFIhd3xFnyGdyYuitrFuRFmWW+sTEOqkxXBZWbUGJ ZdYUddOOopXEGgZ/ow/O8EEJ/POpZg7Mvse7qGZUaJ4ZT6gL9lqbg7wFAZSmUTSy4gmX PlbHh73Ujt62BTl/xBdfY9Y4TuVlFbD0o6XFGXcFsGmIy5N1wa53pA/zAOzUSKAh2k50 ei5g== X-Gm-Message-State: AJIora9ts1OxMabNhYGZW9vbIE9/wb34RQ/nxRSY1T1AtFn7LeOnfydR anggfaP9X7r/4DBDw7Iaxdwatu9mbjs/KdFrPRM= X-Google-Smtp-Source: AGRyM1uq7U8qY/+ivMzwNH4XWEMXvTenJF9DJ6ZAXZyXNZ4cJfe7baqiJ6hx2BiALRWXzqt1OGRBbnMv/2j7rf28GAw= X-Received: by 2002:a9d:4e91:0:b0:616:8273:76e6 with SMTP id v17-20020a9d4e91000000b00616827376e6mr17291278otk.340.1657113515833; Wed, 06 Jul 2022 06:18:35 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: <83h73u75bi.fsf@gnu.org> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Wed, 6 Jul 2022 14:19:43 +0100 Message-ID: Subject: Re: bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use To: Eli Zaretskii Content-Type: multipart/alternative; boundary="00000000000076be7105e322ced5" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 56407 Cc: 56407@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000076be7105e322ced5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 --00000000000076be7105e322ced5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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
--00000000000076be7105e322ced5-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 06 09:22:11 2022 Received: (at 56407) by debbugs.gnu.org; 6 Jul 2022 13:22:11 +0000 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 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 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) MIME-Version: 1.0 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> In-Reply-To: From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Wed, 6 Jul 2022 14:23:11 +0100 Message-ID: Subject: Re: bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use To: Eli Zaretskii Content-Type: multipart/alternative; boundary="000000000000d5f22005e322daa4" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 56407 Cc: 56407@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --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-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 06 09:40:12 2022 Received: (at 56407) by debbugs.gnu.org; 6 Jul 2022 13:40:12 +0000 Received: from localhost ([127.0.0.1]:52877 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o95GG-0004S2-2i for submit@debbugs.gnu.org; Wed, 06 Jul 2022 09:40:12 -0400 Received: from mail-pg1-f181.google.com ([209.85.215.181]:44851) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o95GD-0004Rk-Q0 for 56407@debbugs.gnu.org; Wed, 06 Jul 2022 09:40:10 -0400 Received: by mail-pg1-f181.google.com with SMTP id bf13so999772pgb.11 for <56407@debbugs.gnu.org>; Wed, 06 Jul 2022 06:40:09 -0700 (PDT) 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:content-transfer-encoding; bh=KusFLPqeIaBlY+hml0d+SZBVeTV71JBZ8rCoPgMkQ5Q=; b=fg4lwZt27eKmFD6kJssdujB0c2GRz2KoBk1KxxzD0UCdoFjKzOFCqoYQi0kXIvqTge EcqPcl0OdMzet2i9Yk95gxDCmUMn6jrW+pk2yenFHgzUBsf0XwbY1KQSrkklKfD4Rvn+ Kiy40bNWw3HD6iLZkzoe8qkmZNHSwGTiHoIgY1/Ba9/3NtK3i2D9ulKoltbfUw1gOFdf Z/r9YhJiGHmiPV8ezBy3VJW5j/3f3alaqFbehwlhkhqbIwNLCcxORC+aS4zmmm4tteb8 Dz/dh++zVCY4ccIo17Ja9WFmk8qFPs+Ogm/upkQZRDJRyCrCSdYN0ERNOary+2hDL4N1 TVmg== X-Gm-Message-State: AJIora/AOjE1r4KSn3pghMUpazm4RrhnClG4GMq5KAzyfk1EFVyjBoNU FqN+u67VEoCPj6clR3duXacJSbhFNHspX4ndL6Q= X-Google-Smtp-Source: AGRyM1umyw6ptXs2lDc7PqEyrcr0ta0FkD3e+RAY0vpgudIw3p50K4f60NUI610ZCuKBoI0xbqAgjkk7wx0aPSSh/To= X-Received: by 2002:aa7:8e17:0:b0:528:9f8d:ad38 with SMTP id c23-20020aa78e17000000b005289f8dad38mr6385095pfr.4.1657114804014; Wed, 06 Jul 2022 06:40:04 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: From: Stefan Kangas Date: Wed, 6 Jul 2022 15:39:52 +0200 Message-ID: Subject: Re: bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 56407 Cc: Eli Zaretskii , 56407@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Jo=C3=A3o T=C3=A1vora writes: > (eval-after-load 'desktop > ...) `with-eval-after-load' is nicer, IMO. > Then again, eval-after-load shouldn't be used in packages, so I've read s= omewhere > (manual?). See the last paragraph in (info "(elisp) Hooks for Loading") From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 06 09:46:41 2022 Received: (at 56407) by debbugs.gnu.org; 6 Jul 2022 13:46:41 +0000 Received: from localhost ([127.0.0.1]:52885 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o95MW-0004cj-Vh for submit@debbugs.gnu.org; Wed, 06 Jul 2022 09:46:41 -0400 Received: from mail-oi1-f180.google.com ([209.85.167.180]:46929) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o95ML-0004cK-TH for 56407@debbugs.gnu.org; Wed, 06 Jul 2022 09:46:40 -0400 Received: by mail-oi1-f180.google.com with SMTP id i3so19900346oif.13 for <56407@debbugs.gnu.org>; Wed, 06 Jul 2022 06:46:29 -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=NJht2/lqVEOV92Ldx2fCC3kxX8MuCEm7ODd9s4lPZRs=; b=alOlQSlGsMqd0VxWZ8a6xj7NsXJa9LprihEeJp2wF9Bi+bScU4vsi1YPg++wE4+MPA 2eVO0vb/B3lf3TKeA2CNi3BSmB5awbGqRVQ0VqAe0/0cctdAVPs8rRUDM+sVE9NXmWak nE1YhJwqs6/BpODOnRhhPeFlek5cRnrsoDy3qevSVb9bB82QxYQJhfsZofv21ZCQETyg gP8NfoCOGlpCu/0P/rSnuywHlUTSX0RBLETk5G5oSDqPk6k8gfNIrMhKcHDE2AqnmwZv r9tVE3QDZPZeyW4gplhXjrNdQhOAF5ZhtMHq3zzGcCQ+NjGIeqEK9N94pDztlbjomrg0 9GYw== 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=NJht2/lqVEOV92Ldx2fCC3kxX8MuCEm7ODd9s4lPZRs=; b=m4O5iwwvLyrxOzKl2KrzRhKNW5ByNefwMy/1vtUamboXXHYHEYeT7TKQxO9KIu+jMe mmpzgmH/8Ojyk7u0TnCiI05VbQKhyaBLkydxOxhsY/V+G6ufcpKz2kuWmgiicCt2wItJ WC2nVqCk9/AnTMqUmbyBhKtwKCeZOEvI3Lcv2VIU8whxAB2kz/g9q9vAlPz0K1xmYbI0 a3Slo3scEwulR5WlOx8bFLw1tmxuVj2xvXJVraYjVCB5Lc6PttHHFcWf1c5z4frCWNS6 qOHj2FVEPe6lD6pSUvXXQPCb3m4f0Wpj+W9xFMhr9fpYg0h/qTxTTo6aZf+6J1jem52u ui7w== X-Gm-Message-State: AJIora8jYeiRLIWfj9xIZd6rNzlEW4uoUFPxYzWFcwXWbgrpbD6E3nrz TjF3IeCfbfWF9AcbKZqMsIFNHfOOIEn3gpvw36c= X-Google-Smtp-Source: AGRyM1vBEG5NA9lz+3G7I7YWa2z3x+kc4q+StqxZDB2r5dA2ce3rNdajpV3UNYhTGFLfrK5zMUSCJbaNf7t+bzB/HcA= X-Received: by 2002:aca:4b90:0:b0:335:b574:6108 with SMTP id y138-20020aca4b90000000b00335b5746108mr20635760oia.19.1657115184163; Wed, 06 Jul 2022 06:46:24 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Wed, 6 Jul 2022 14:47:32 +0100 Message-ID: Subject: Re: bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use To: Stefan Kangas , Lars Ingebrigtsen Content-Type: multipart/alternative; boundary="000000000000e7700105e32331a9" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 56407 Cc: Eli Zaretskii , 56407@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000e7700105e32331a9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jul 6, 2022 at 2:40 PM Stefan Kangas wrote: > > (eval-after-load 'desktop > > ...) > > `with-eval-after-load' is nicer, IMO. > > > Then again, eval-after-load shouldn't be used in packages, so I've read > somewhere > > (manual?). > > See the last paragraph in (info "(elisp) Hooks for Loading") > Don't hold me in suspense! :-) what does it say vis-a-vis use in libraries? Maybe we should just use it. If it works, it's the easiest one and not terribly ugly. Why is it the easiest one? Because I've just remembered an obvious drawback of the symbol-property approach: it will only work on Emacs trunk, _unless_ we make the little dance (that I've done a few times) of making desktop.el a GNU ELPA :core package and making eglot.el depend on that package (which is different from _requiring_ the load of that package)= . Lars, what do you think? Jo=C3=A3o --000000000000e7700105e32331a9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Jul 6, 2022 at 2:40 PM Stefan Kangas <stefan@marxist.se> wrote:
>=C2=A0 =C2=A0(eval-after-load 'desktop
>=C2=A0 =C2=A0 ...)

`with-eval-after-load' is nicer, IMO.

> Then again, eval-after-load shouldn't be used in packages, so I= 9;ve read somewhere
> (manual?).

See the last paragraph in (info "(elisp) Hooks for Loading")
<= /blockquote>

Don't hold me in suspense! :-) what doe= s it say vis-a-vis use in libraries?

Maybe we shou= ld just use it. If it works, it's the easiest one and not terribly
=
ugly.

Why is it the easiest one?=C2=A0 = Because I've just remembered an obvious
drawback of the = symbol-property approach: it will only work on Emacs trunk,
= _unless_ we make the little dance (that I've done a few times) of makin= g
desktop.el a GNU ELPA :core=C2=A0 package and making eglot= .el depend on
that package (which is different from _requiri= ng_ the load of that package).

Lars, what do y= ou think?

Jo= =C3=A3o
--000000000000e7700105e32331a9-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 06 09:52:26 2022 Received: (at 56407) by debbugs.gnu.org; 6 Jul 2022 13:52:26 +0000 Received: from localhost ([127.0.0.1]:52905 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o95S6-0004pQ-2U for submit@debbugs.gnu.org; Wed, 06 Jul 2022 09:52:26 -0400 Received: from mail-pg1-f175.google.com ([209.85.215.175]:38623) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o95S4-0004pB-L7 for 56407@debbugs.gnu.org; Wed, 06 Jul 2022 09:52:24 -0400 Received: by mail-pg1-f175.google.com with SMTP id e132so14079573pgc.5 for <56407@debbugs.gnu.org>; Wed, 06 Jul 2022 06:52:24 -0700 (PDT) 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:content-transfer-encoding; bh=gALJGmYO1JZqbMHpEm8wf2g45u0tXb9KqPrwP5ASe38=; b=PCRsC4VszV0dcnP1lJJxww4UYHLnn6nSLzbNBCU/3/AsDAhRfI6BKT79ybda0V/IxB DRvfX8/eJGeKw18u1jCp6fNi+DU1M8aDVznnYAqDF8rE4eXgkS8ep5vAwKHHt2eURxJW lb8nD9mzmX3/lxSA839WhbC307INUK0bhp3U7EXugjfiVuCadvf2vO+sf2XmgyNlcTAx Zl6xr+J0ekIPu+rkHRRSRVms3nkpN8qUgw4dpVR2E1own4D9snWN5wqtomtbEfsbPcJr 0LT8u6xkSHCEnvNNKPbVkm1NrGVKd9wjQE+nUd99HMN0+LKfhF+emI28+snzFaERIXq7 L0OA== X-Gm-Message-State: AJIora/twoLQwkGwXg067JbFX2daWG30eSzKkvoW4ThnEqhhqMJve87t IVO0EsE2RiMkpXQF5P3r+utb7Rj2ohldaccUx30= X-Google-Smtp-Source: AGRyM1s6iq67Pw6xLWnRl3eL6NxxsPlwBwLZ4VtM7vGuJ3xl2gpxgv1+86nJGA5YzwUDBGepNv/T310b8VEajcaZpdo= X-Received: by 2002:a63:2254:0:b0:40d:d291:7710 with SMTP id t20-20020a632254000000b0040dd2917710mr34099720pgm.269.1657115538894; Wed, 06 Jul 2022 06:52:18 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: From: Stefan Kangas Date: Wed, 6 Jul 2022 15:52:06 +0200 Message-ID: Subject: Re: bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 56407 Cc: Lars Ingebrigtsen , Eli Zaretskii , 56407@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Jo=C3=A3o T=C3=A1vora writes: >> See the last paragraph in (info "(elisp) Hooks for Loading") > > Don't hold me in suspense! :-) what does it say vis-a-vis use in librarie= s? Normally, well-designed Lisp programs should not use =E2=80=98with-eval-after-load=E2=80=99. If you need to examine and set the= variables defined in another library (those meant for outside use), you can do it immediately=E2=80=94there is no need to wait until the library is loaded. = If you need to call functions defined by that library, you should load the library, preferably with =E2=80=98require=E2=80=99 (*note Named Features::)= . From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 06 09:53:10 2022 Received: (at 56407) by debbugs.gnu.org; 6 Jul 2022 13:53:10 +0000 Received: from localhost ([127.0.0.1]:52909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o95So-0004qv-9z for submit@debbugs.gnu.org; Wed, 06 Jul 2022 09:53:10 -0400 Received: from quimby.gnus.org ([95.216.78.240]:55174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o95Sj-0004qD-5e for 56407@debbugs.gnu.org; Wed, 06 Jul 2022 09:53:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=N1ERc2HCMAbRH2yWMF+pzvCpLJpOPJBK6mbp0dOxxnk=; b=fQ+9Pclh7fhO56jvoLotxMST85 /ZjfiZz+dPji5xpLNk7x1FO0A0bqEzcn1NIo2IcTbC1vu3t6y9Ol8jSl70FmRt16pQxgro+WalnGv lS5OfGK9X89v2q2t4+xPMd5UHZbALnlo91/60Rq7nQsHTvg1sR28i77btAaUnzLm7+cw=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o95SZ-0005rw-AI; Wed, 06 Jul 2022 15:52:57 +0200 From: Lars Ingebrigtsen To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use In-Reply-To: (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vora=22's?= message of "Wed, 6 Jul 2022 14:47:32 +0100") 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> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEUMCgoqIxtWRjCh bz7///9PFI8XAAAAAWJLR0QEj2jZUQAAAAd0SU1FB+YHBg0wIHdyVJsAAAGxSURBVDjLXZOLtYMw CIZDXABwASELtLD/bpeHXrU5p9XwhWd+xxhAveaX3U00l9C4V7AAVGZsE54+vNxF+QJAQho/InX3 sDI1mGmLmJstN61NZ+h/YJYAacVX4uUZyYQfBYHysjin5SEPB1cqLC7jBfIVlqsyBn+mGAThZWr5 +gTsIGNfJrnR2740LdF3gXm7dNjd/fhP2eV25VO9TXx3FxDHjPbqCFwgK1fCPRxgPFYUBDnpJRUf 8CoYBJQIcPUe7oKRMwtaFxJ46+oAJUOjXJcA/Onq5oEvQPTt9rpuCv95dPleFmO5gq9+o1UNW+UK MMWpZVQArKYWc9niovAGQ2dsUwOb1xhBaO9c044nmAfpCeoY4AyAkFFXNcLQs7DpWmDQKo85rLK7 hBx6vp189lM5JKo5Hca9RV0iBVPfI1bmwL52wGpQdYWwpEV2fR+tU3VWue7k1jsHWadOrnXuYlb+ ssMJiP37H6AjwgkYX/K5NrR/6vh8JsrKC+hAeAFpRQ67pduhQtic4rZXoBzVESBsvuEPsPbw/cdj WX2X4D/Nh1jyehN83iDbDGnB90z+B9sWNR+O443qAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIyLTA3 LTA2VDEzOjQ4OjMyKzAwOjAwobjl2QAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0wNy0wNlQxMzo0 ODozMiswMDowMNDlXWUAAAAASUVORK5CYII= X-Now-Playing: Joan as Police Woman, Tony Allen, Dave Okumu's _The Solution is Restless_: "Geometry Of You" Date: Wed, 06 Jul 2022 15:52:51 +0200 Message-ID: <875ykajqks.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: João Távora writes: > Why is it the easiest one? Because I've just remembered an obvious > drawback of the symbol-property approach: it will only work on Emacs trunk, > _unless_ we make the little dance (that I've done a [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56407 Cc: Eli Zaretskii , Stefan Kangas , 56407@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Jo=C3=A3o T=C3=A1vora writes: > Why is it the easiest one? Because I've just remembered an obvious=20 > drawback of the symbol-property approach: it will only work on Emacs trun= k,=20 > _unless_ we make the little dance (that I've done a few times) of making= =20 > desktop.el a GNU ELPA :core package and making eglot.el depend on=20 > that package (which is different from _requiring_ the load of that packag= e). > > Lars, what do you think? Hm, I'd forgotten that eglot was also an ELPA package. Making desktop a :core package is fine by me, but you're right that it'd be easier to use with-eval-after-load here. (I'm still in favour of adding the symbol-plist thing for desktop as a more long term solution, but we can do both.) --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 06 09:58:25 2022 Received: (at 56407) by debbugs.gnu.org; 6 Jul 2022 13:58:25 +0000 Received: from localhost ([127.0.0.1]:54757 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o95Xs-0005S1-OA for submit@debbugs.gnu.org; Wed, 06 Jul 2022 09:58:25 -0400 Received: from mail-ot1-f46.google.com ([209.85.210.46]:47082) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o95Xq-0005Rl-Nf for 56407@debbugs.gnu.org; Wed, 06 Jul 2022 09:58:23 -0400 Received: by mail-ot1-f46.google.com with SMTP id e14-20020a9d018e000000b00618ca3183a0so11229469ote.13 for <56407@debbugs.gnu.org>; Wed, 06 Jul 2022 06:58:22 -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=lnE2e1+hbvmp3H2Pc/C++pci3QCgPxuVyQ/W1H02xy0=; b=qlpJ6CHrRgAlkWdJ6Gm3EDXBmQYWe1VoVmkc/ew36QZq8c9ySJ4AbkgIZPRIBvZIVD pXrK98pQBMV64FA+1bN414iy9wnqLrbkB/wCzwgfPQ30JmVPHBCodbvEH2RJrHe4nbNl sN8/dr1saF2xp83Lc5+LJL/2TAFLcnnDOEl426FSOqGaKuaibmOSb0PSKFW2X7LYYQtU QUxjJdeJ7YJtwYkZSpQGT7G91C+EGSt2pNbQPOIlO+SdbtXafzfhc9pSkI2HEk8MwNY1 aq1Po8SYq/d2ImJAv5WT+4725Gtnx3btGUkpRpedXGRK7Cp4yvPuLdWnSmlWl3OR/KFN 3J7A== 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=lnE2e1+hbvmp3H2Pc/C++pci3QCgPxuVyQ/W1H02xy0=; b=Nk0jkBw3Qw2XBGu/+rfD3sLfnZzcdeUp/m1Idz6p6EZiC68Xpn1E/6ikUvq4YBRsWq 7y6L6mMK/GCt95ppAsYn0qGndCPBI/+M5IHFNayzSybAZG/xk+exzEitQVAhAALeSwZW 6pLOxkAWunEfkCrksPzXtfFhijzugSymtdndYNOGJ376pShIEyLay+lh5oCxG0ZpkQdZ Z0UJ3/wRiV7fYH5WjnDyBxjYJZkru8ISxcBRedh7IS8Tsgcr7RBTcl/1uS7d0L4/10r/ sZcdcI/9TrWbFlEfsF/OU1TH0Y/W6pw+j6kJcdJ7I1GoW5i6Tqx3CYCE0dWp8+AqIRWC qATg== X-Gm-Message-State: AJIora9VCk0uMwDUYISw+NUv6lNQ+L2h4/r0Tui9bUXpIQmQq87D85Wr LFymZPxLk6i44Igg5+ViJr20xfJlohO/QPakjUKLnpxM X-Google-Smtp-Source: AGRyM1udal6VId9Pijh0I8E2RVqMFzOgwQCpI3WRPKin9Eb6xiHuVlldF3yByi18pwd4AHiRzJa3WK9vpngMpnrQrDs= X-Received: by 2002:a9d:4e91:0:b0:616:8273:76e6 with SMTP id v17-20020a9d4e91000000b00616827376e6mr17372198otk.340.1657115896993; Wed, 06 Jul 2022 06:58:16 -0700 (PDT) MIME-Version: 1.0 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> <875ykajqks.fsf@gnus.org> In-Reply-To: <875ykajqks.fsf@gnus.org> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Wed, 6 Jul 2022 14:59:25 +0100 Message-ID: Subject: Re: bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use To: Lars Ingebrigtsen Content-Type: multipart/alternative; boundary="000000000000645c2305e3235cdd" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 56407 Cc: Eli Zaretskii , Stefan Kangas , 56407@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000645c2305e3235cdd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jul 6, 2022 at 2:53 PM Lars Ingebrigtsen wrote: > Jo=C3=A3o T=C3=A1vora writes: > > > Why is it the easiest one? Because I've just remembered an obvious > > drawback of the symbol-property approach: it will only work on Emacs > trunk, > > _unless_ we make the little dance (that I've done a few times) of makin= g > > desktop.el a GNU ELPA :core package and making eglot.el depend on > > that package (which is different from _requiring_ the load of that > package). > > > > Lars, what do you think? > > Hm, I'd forgotten that eglot was also an ELPA package. > > Making desktop a :core package is fine by me, but you're right that it'd > be easier to use with-eval-after-load here. (I'm still in favour of > adding the symbol-plist thing for desktop as a more long term solution, > but we can do both.) > Yeah, the problem is if desktop.el uses recently added features of some _other_ library. Then I'd have to add that one to :core as well, or somehow clarify the supported uses of desktop.el in that context. I don't have time for that, so I think I'll go with `with-eval-after-load` in eglot.el and call it a day. Jo=C3=A3o --000000000000645c2305e3235cdd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Jul 6, 2022 at 2:53 PM Lars Ingebrigtsen <larsi@gnus.org> wrote:
Jo=C3=A3o T=C3=A1vora <joaotavora@gmail.com> writ= es:

> Why is it the easiest one?=C2=A0 Because I've just remembered an o= bvious
> drawback of the symbol-property approach: it will only work on Emacs t= runk,
> _unless_ we make the little dance (that I've done a few times) of = making
> desktop.el a GNU ELPA :core=C2=A0 package and making eglot.el depend o= n
> that package (which is different from _requiring_ the load of that pac= kage).
>
> Lars, what do you think?

Hm, I'd forgotten that eglot was also an ELPA package.

Making desktop a :core package is fine by me, but you're right that it&= #39;d
be easier to use with-eval-after-load here.=C2=A0 (I'm still in favour = of
adding the symbol-plist thing for desktop as a more long term solution,
but we can do both.)

Yeah, the problem = is if desktop.el uses recently added features of
some _other_ lib= rary.=C2=A0 Then I'd have to add that one to :core as well,
o= r somehow clarify the supported uses of desktop.el in that context.

I don't have time for that, so I think I'll go wi= th `with-eval-after-load` in
eglot.el and call it a day.

Jo=C3=A3o
--000000000000645c2305e3235cdd--