From unknown Sat Jun 21 05:16:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69391: 30.0.50; `enable-command' doesn't permanently enable `help-fns-edit-variable' Resent-From: Martin Marshall Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Feb 2024 17:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69391 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 69391@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.170888307725872 (code B ref -1); Sun, 25 Feb 2024 17:45:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 Feb 2024 17:44:37 +0000 Received: from localhost ([127.0.0.1]:33905 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reIYH-0006jD-6m for submit@debbugs.gnu.org; Sun, 25 Feb 2024 12:44:37 -0500 Received: from lists.gnu.org ([209.51.188.17]:51780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reIYE-0006j2-Pi for submit@debbugs.gnu.org; Sun, 25 Feb 2024 12:44:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1reIXp-0004fs-8G for bug-gnu-emacs@gnu.org; Sun, 25 Feb 2024 12:44:09 -0500 Received: from mail-yw1-x1129.google.com ([2607:f8b0:4864:20::1129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1reIXm-0008H0-Qa for bug-gnu-emacs@gnu.org; Sun, 25 Feb 2024 12:44:09 -0500 Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-607cd210962so20689097b3.2 for ; Sun, 25 Feb 2024 09:44:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martinmarshall-com.20230601.gappssmtp.com; s=20230601; t=1708883044; x=1709487844; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=e5vzY91btKmlf9BZXWgv1vPhEzoIFwCbzvfqw6eP6nc=; b=b5l75KF1Hv1sa5hSCCS7shrwGmNkNJK7jiRi0Ap+4UoDMxf1m45dFp5t18dLMlXeCc wH27A4iXaw8ICYoa+63IVXOBmXe1fOLnOEIZm32PFSznE6lruCGJRCpNLEqSgAxz/Haz olqO+EPtGVlhyBLxEyzNk/jgqBlQz0M8jBkNCiHW+gkrjHA07eVNImy141fERsK+dSjd AI1vHauWBrTgbFtTscsoAbrMBEE5wj78BO2I4uz1+hPG/cRQEck6FDT7EUT+3nyiO5KC O+IZNjD1foskjWWb5ybLWpxR3JpPeaIfpUveGMju8sLJLk3OM2FjdvKQw9y7tCA46OV4 9nBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708883044; x=1709487844; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=e5vzY91btKmlf9BZXWgv1vPhEzoIFwCbzvfqw6eP6nc=; b=DhiQRubg5UAtteF+/2pD/6IZ7ZmcxZSuRa7z/3KpMlnRDq2U1zJJI5IOi3o3P8/qFg +oGrIDSg/opdsC8034nshqEvSMJQ+Ob7/1iyH6it2bJQsiOCkU1oVNbrz5PD4nxMyEYg 1lYgbjEJAIPgmnweWacqRKHMZd8LjIadBWA78kNbyewq7aLAwxCEVCGfUhL/xqmnmoLY hkEZaw0iYrNGwOuH+cNMDY9iuYimMiTx00O138rmYYEXxVDO3rNaALWN/80pcbGjpI5N K27uIUx3+1tF0cxXShnzhFBLzhHhdsw3fQhUkYpKI2pZ7whrnxuZ+yhUh9yWemUtjRvh 59OQ== X-Gm-Message-State: AOJu0YwJVjzgY9qjOPw3ykkCk7eqWc1YdmCtSwUH8tkbC0pqeYZLWNZ/ /WKXTxsDV89VFkkbXJ5iZNlAAfVrJujBmRx8FTn07HzHmln8PzkMilLqt88b2XZ4DgcgUfZt8Vc = X-Google-Smtp-Source: AGHT+IGauMF9eGaBW143CRmgS9wHbZnGf60soI53nUyTTU83VktyJmqRV1q4iO+qloCRnrG+lwEHfg== X-Received: by 2002:a81:a7c8:0:b0:5ff:790d:62a with SMTP id e191-20020a81a7c8000000b005ff790d062amr4116505ywh.5.1708883043650; Sun, 25 Feb 2024 09:44:03 -0800 (PST) Received: from vader (68-252-220-225.lightspeed.tukrga.sbcglobal.net. [68.252.220.225]) by smtp.gmail.com with ESMTPSA id v185-20020a0dd3c2000000b00604a80b94b9sm812457ywd.129.2024.02.25.09.44.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 09:44:03 -0800 (PST) From: Martin Marshall Date: Sun, 25 Feb 2024 12:44:01 -0500 Message-ID: <875xycsala.fsf@martinmarshall.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: none client-ip=2607:f8b0:4864:20::1129; envelope-from=law@martinmarshall.com; helo=mail-yw1-x1129.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) 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 (---) Description: When initially calling `help-fns-edit-variable', the disabled command pop-up appears. There's a prompt to enable the command, and pressing "y" does so for the current session. Thereafter, a second message appears in the minibuffer advising to press "y" again to enable the command in future sessions. However, this does not have the described effect. Pressing "y" adds "(put 'help-fns-edit-variable 'disabled nil)" to the end of `user-init-file'. However, after restarting Emacs, attempting to invoke the command again brings up the same "disabled command" pop-up. Recreating: 1. Create directory for testing, cd; mkdir emacs-test-disabled-cmds; cd emacs-test-disabled-cmds 2. "touch init.el" 3. "emacs --init-directory . &" 4. "C-x b *scratch* RET" 5. "(setopt help-enable-variable-value-editing t) C-x C-e" 6. "C-h v electric-pair-mode RET" 7. "C-x o" then move cursor to the `nil' value shown 8. Press "e" to edit the variable value, a disabled-command pop-up appears. 9. Press "y" to "enable the command". 10. Press "y" again to enable it "for future editing sessions also". 11. Press "C-c C-c" to exit the variable-editing buffer. 12. Go back to the *Help* buffer and try to edit the variable again, there is no pop-up, because the command has been enabled for this session. 13. Press "C-x C-c" to exit Emacs. 14. "cat init.el" confirms that the init file does contain "(put 'help-fns-edit-variable 'disabled nil)" 15. But when you repeat steps 3 through 8, you find that the disabled command pop-up still appears. Probable diagnosis: It looks like most of Emacs's disabled commands are either set disabled in libraries that load before the init-file, or they are disabled via autoload cookies, like this one: ;;;###autoload (put 'dired-find-alternate-file 'disabled t) But that's not the case for `help-fns-edit-variable' (and a few others, which I located using ripgrep). So when "help-fns.el" loads, it re-disables the command that was supposed to have been enabled by the call to `put' that Emacs added to the init file. List of commands where this seems to be the case: Command Library Comments* ======= ======= ======== help-fns-edit-variable help-fns erc-remove-text-properties-region erc secrets-mode secrets "doesn't make sense to call it interactively." Info-edit info-edit "Editing Info nodes by hand is not recommended. This feature will be removed in future." \* I've only confirmed the problem with respect to `help-fns-edit-variable'. Also, regarding `secrets-mode' and `Info-edit', comments found in their respective packages may indicate "feature-not-a-bug" for those two. To enable any of these commands permanently, the user would have to either load the library earlier in the init file, or surround the `put' call with a call to `eval-after-load'. System Information: In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.16.0) of 2024-02-25 built on vader Repository revision: e02c4a864f02787f0e194c9e8a6d4ab0b18ca39f Repository branch: master System Description: Debian GNU/Linux 12 (bookworm) Configured using: 'configure --with-pgtk --with-native-compilation=aot --without-compress-install --with-tree-sitter --with-imagemagick' Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ IMAGEMAGICK JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix -- Best regards, Martin Marshall From unknown Sat Jun 21 05:16:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69391: 30.0.50; `enable-command' doesn't permanently enable `help-fns-edit-variable' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Feb 2024 14:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69391 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Martin Marshall , Stefan Monnier Cc: 69391@debbugs.gnu.org Received: via spool by 69391-submit@debbugs.gnu.org id=B69391.170895751829326 (code B ref 69391); Mon, 26 Feb 2024 14:26:02 +0000 Received: (at 69391) by debbugs.gnu.org; 26 Feb 2024 14:25:18 +0000 Received: from localhost ([127.0.0.1]:39284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rebuu-0007cp-Jd for submit@debbugs.gnu.org; Mon, 26 Feb 2024 09:25:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reblm-00073R-9o for 69391@debbugs.gnu.org; Mon, 26 Feb 2024 09:15:51 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rebhY-00024O-Ap; Mon, 26 Feb 2024 09:11:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=OsCA4ipg5LDPll0Gz2uPQYChh8auhkUcUWDrBsDdTxg=; b=G4TySwqcZ6A6 HcxtsgbDW1+uS/j/EmbqWZZ5RzqPu6mL6vGPi1xzxfziL9d2UR6F6fV1FcXc8jNqUsERtuFg7OoKS j3i87OajGLeRn134SWc1DkYw9RYlRCUgmsDodC48p5BFcOFK0ozK3ZFkXBOYtCD0PMUr7PKo9JHRZ eKbfwoLDR2CBgPc3l84hNcO9nfvit/OLPphpXayEJeGZ8KCdGs1qs72L6H8LugFwikqrI7BU75nOz pY66xJQNTWqvsi2XOo14mcBhq4Q11VPLPA3gPuKLLAgK6vt0//Pg6raL/kIb6GrVef7h/REYMo0Gc CLkR+uy1j2KQnMVCpkkDqg==; Date: Mon, 26 Feb 2024 16:11:24 +0200 Message-Id: <86wmqruxgz.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <875xycsala.fsf@martinmarshall.com> (message from Martin Marshall on Sun, 25 Feb 2024 12:44:01 -0500) References: <875xycsala.fsf@martinmarshall.com> X-Spam-Score: -2.3 (--) 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: Martin Marshall > Date: Sun, 25 Feb 2024 12:44:01 -0500 > > Description: > > When initially calling `help-fns-edit-variable', the disabled command > pop-up appears. There's a prompt to enable the command, and pressing > "y" does so for the current session. Thereafter, a second message > appears in the minibuffer advising to press "y" again to enable the > command in future sessions. However, this does not have the described > effect. > > Pressing "y" adds "(put 'help-fns-edit-variable 'disabled nil)" to the > end of `user-init-file'. However, after restarting Emacs, attempting to > invoke the command again brings up the same "disabled command" pop-up. > > Recreating: > > 1. Create directory for testing, > cd; mkdir emacs-test-disabled-cmds; cd emacs-test-disabled-cmds > 2. "touch init.el" > 3. "emacs --init-directory . &" > 4. "C-x b *scratch* RET" > 5. "(setopt help-enable-variable-value-editing t) C-x C-e" > 6. "C-h v electric-pair-mode RET" > 7. "C-x o" then move cursor to the `nil' value shown > 8. Press "e" to edit the variable value, a disabled-command pop-up > appears. > 9. Press "y" to "enable the command". > 10. Press "y" again to enable it "for future editing sessions also". > 11. Press "C-c C-c" to exit the variable-editing buffer. > 12. Go back to the *Help* buffer and try to edit the variable again, > there is no pop-up, because the command has been enabled for this > session. > 13. Press "C-x C-c" to exit Emacs. > 14. "cat init.el" confirms that the init file does contain > "(put 'help-fns-edit-variable 'disabled nil)" > 15. But when you repeat steps 3 through 8, you find that the disabled > command pop-up still appears. > > Probable diagnosis: > > It looks like most of Emacs's disabled commands are either set disabled > in libraries that load before the init-file, or they are disabled via > autoload cookies, like this one: > > ;;;###autoload (put 'dired-find-alternate-file 'disabled t) > > But that's not the case for `help-fns-edit-variable' (and a few others, > which I located using ripgrep). So when "help-fns.el" loads, it > re-disables the command that was supposed to have been enabled by the > call to `put' that Emacs added to the init file. Thanks for the analysis. Stefan, is there a better way than convert the form we have in help-fns.el: (put 'help-fns-edit-variable 'disabled t) into an autoload comment, like we do, e.g., with dired-find-alternate-file? From unknown Sat Jun 21 05:16:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69391: 30.0.50; `enable-command' doesn't permanently enable `help-fns-edit-variable' Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Feb 2024 14:41:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69391 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 69391@debbugs.gnu.org, Martin Marshall Received: via spool by 69391-submit@debbugs.gnu.org id=B69391.170895845332241 (code B ref 69391); Mon, 26 Feb 2024 14:41:03 +0000 Received: (at 69391) by debbugs.gnu.org; 26 Feb 2024 14:40:53 +0000 Received: from localhost ([127.0.0.1]:40155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1recA0-0008Nw-R1 for submit@debbugs.gnu.org; Mon, 26 Feb 2024 09:40:53 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:30266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rec9z-0008NU-72 for 69391@debbugs.gnu.org; Mon, 26 Feb 2024 09:40:51 -0500 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id A1DD0441AD7; Mon, 26 Feb 2024 09:40:16 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1708958415; bh=cyNzVBKmQZa8ruoy83mQ/jZSPPSawc2WbaaKzCjnGj4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=D2tM47N52HvwQat7av/JqfBB1A8otkW8TKfb1vxXE81ZZxBeuPTbCOQqPjUsoOsTz g9jJ/J3c/xDvrieaqh25xIp/DJ/pBWeydXZndBxDy/ePd6tPQTgrFA0hTl/+FtIn2o MsBybWFudkouHUV8+HKcbd97sO/G9kh3+Hejgq/L3LDA25JCC93YcRIzMZkcn7qBhW Ua2ozJDSJ3LjI/aK0O8lIM9YFBUDYyViUAkdbZgKokvM6wCSr/shVHjHNeIyvyXwZ+ R+AZ7PlwBSUzmkNepZA9hP0j0t/JZaI+UKeoKV2pZt52FaMw5lpiB6iDbzf1eJNpJ9 9QeQ0ApdfaTxA== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 3FF33441AB3; Mon, 26 Feb 2024 09:40:15 -0500 (EST) Received: from pastel (unknown [45.72.205.238]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 16ED312023C; Mon, 26 Feb 2024 09:40:15 -0500 (EST) From: Stefan Monnier In-Reply-To: <86wmqruxgz.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 26 Feb 2024 16:11:24 +0200") Message-ID: References: <875xycsala.fsf@martinmarshall.com> <86wmqruxgz.fsf@gnu.org> Date: Mon, 26 Feb 2024 09:40:10 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.001 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) 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 (---) > Stefan, is there a better way than convert the form we have in > help-fns.el: > > (put 'help-fns-edit-variable 'disabled t) > > into an autoload comment, like we do, e.g., with > dired-find-alternate-file? If we want to allow third party packages to use that `disabled` functionality, maybe we should instead change the code that inserts the (put 'help-fns-edit-variable 'disabled nil) E.g. we could try to make it insert (with-eval-after-load 'help-fns (put 'help-fns-edit-variable 'disabled nil)) tho I suspect this will happen too late for autoloaded functions. Or we could make it do (put 'help-fns-edit-variable 'disabled-override t) and change the code that checks `disabled` accordingly. Stefan