From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Martin Marshall Newsgroups: gmane.emacs.bugs Subject: bug#69391: 30.0.50; `enable-command' doesn't permanently enable `help-fns-edit-variable' Date: Sun, 25 Feb 2024 12:44:01 -0500 Message-ID: <875xycsala.fsf@martinmarshall.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20406"; mail-complaints-to="usenet@ciao.gmane.io" To: 69391@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 25 18:44:58 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1reIYc-000544-B6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Feb 2024 18:44:58 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1reIYI-0004kY-Rs; Sun, 25 Feb 2024 12:44:38 -0500 Original-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 1reIYH-0004kI-RI for bug-gnu-emacs@gnu.org; Sun, 25 Feb 2024 12:44:37 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1reIYH-0008IT-JF for bug-gnu-emacs@gnu.org; Sun, 25 Feb 2024 12:44:37 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1reIYg-0006kv-DY for bug-gnu-emacs@gnu.org; Sun, 25 Feb 2024 12:45:02 -0500 X-Loop: help-debbugs@gnu.org 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-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.170888307725872 (code B ref -1); Sun, 25 Feb 2024 17:45:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Feb 2024 17:44:37 +0000 Original-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 Original-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 Original-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 Original-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 Original-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) Original-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) 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:280629 Archived-At: 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