From: Eli Zaretskii <eliz@gnu.org>
To: Martin Marshall <law@martinmarshall.com>,
Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 69391@debbugs.gnu.org
Subject: bug#69391: 30.0.50; `enable-command' doesn't permanently enable `help-fns-edit-variable'
Date: Mon, 26 Feb 2024 16:11:24 +0200 [thread overview]
Message-ID: <86wmqruxgz.fsf@gnu.org> (raw)
In-Reply-To: <875xycsala.fsf@martinmarshall.com> (message from Martin Marshall on Sun, 25 Feb 2024 12:44:01 -0500)
> From: Martin Marshall <law@martinmarshall.com>
> 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?
next prev parent reply other threads:[~2024-02-26 14:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-25 17:44 bug#69391: 30.0.50; `enable-command' doesn't permanently enable `help-fns-edit-variable' Martin Marshall
2024-02-26 14:11 ` Eli Zaretskii [this message]
2024-02-26 14:40 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86wmqruxgz.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=69391@debbugs.gnu.org \
--cc=law@martinmarshall.com \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).