GNU bug report logs -
#67835
30.0.50; Error with undocumented disabled commands
Previous Next
Reported by: kakkokakko <at> gmail.com
Date: Fri, 15 Dec 2023 13:32:02 UTC
Severity: normal
Found in version 30.0.50
Fixed in version 29.2
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 67835 in the body.
You can then email your comments to 67835 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67835
; Package
emacs
.
(Fri, 15 Dec 2023 13:32:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
kakkokakko <at> gmail.com
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 15 Dec 2023 13:32:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
1. emacs -Q --eval "(progn (defun foo () (interactive)) (put 'foo 'disabled t))"
2. M-x foo RET
Then, I encountered the error message "Wrong type argument:
char-or-string-p, nil". This behavior is different from that in
previous versions, like 27.1, where I received the following message.
| You have invoked the disabled command foo.
| It is disabled because new users often find it confusing.
| Here’s the first part of its description:
|
| << not documented >>
| ...
I also expect similar behavior in 30.0.50.
In 30.0.50, it appears that disabled-command-function in
novice.el triggers this error by executing (insert nil) for
undocumented commands in the following code.
| (insert (condition-case ()
| (documentation cmd)
| (error "<< not documented >>")))
Although omitting a docstring is generally considered poor practice,
triggering an error for such commands might not be intentional
behavior. The corresponding code in 27.1 was as follows:
| (... (or (condition-case ()
| (documentation cmd)
| (error nil))
| "<< not documented >>"))
--
KH
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67835
; Package
emacs
.
(Sat, 16 Dec 2023 13:12:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 67835 <at> debbugs.gnu.org (full text, mbox):
> Date: Fri, 15 Dec 2023 19:45:13 +0900
> From: kakkokakko <at> gmail.com
>
> 1. emacs -Q --eval "(progn (defun foo () (interactive)) (put 'foo 'disabled t))"
> 2. M-x foo RET
>
> Then, I encountered the error message "Wrong type argument:
> char-or-string-p, nil". This behavior is different from that in
> previous versions, like 27.1, where I received the following message.
>
> | You have invoked the disabled command foo.
> | It is disabled because new users often find it confusing.
> | Here’s the first part of its description:
> |
> | << not documented >>
> | ...
>
> I also expect similar behavior in 30.0.50.
>
> In 30.0.50, it appears that disabled-command-function in
> novice.el triggers this error by executing (insert nil) for
> undocumented commands in the following code.
>
> | (insert (condition-case ()
> | (documentation cmd)
> | (error "<< not documented >>")))
>
> Although omitting a docstring is generally considered poor practice,
> triggering an error for such commands might not be intentional
> behavior. The corresponding code in 27.1 was as follows:
>
> | (... (or (condition-case ()
> | (documentation cmd)
> | (error nil))
> | "<< not documented >>"))
Stefan, could you please look into this? The above seems to come from
your changes in commit 6ad79059d2f843a1be617c72ae0e9d8a02c9a203. I'd
like to fix this on the emacs-29 branch soon, if possible.
Thanks.
Reply sent
to
Stefan Kangas <stefankangas <at> gmail.com>
:
You have taken responsibility.
(Sat, 16 Dec 2023 19:38:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
kakkokakko <at> gmail.com
:
bug acknowledged by developer.
(Sat, 16 Dec 2023 19:38:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 67835-done <at> debbugs.gnu.org (full text, mbox):
Version: 29.2
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Date: Fri, 15 Dec 2023 19:45:13 +0900
>> From: kakkokakko <at> gmail.com
>>
>> 1. emacs -Q --eval "(progn (defun foo () (interactive)) (put 'foo 'disabled t))"
>> 2. M-x foo RET
>>
>> Then, I encountered the error message "Wrong type argument:
>> char-or-string-p, nil". This behavior is different from that in
>> previous versions, like 27.1, where I received the following message.
>>
>> | You have invoked the disabled command foo.
>> | It is disabled because new users often find it confusing.
>> | Here’s the first part of its description:
>> |
>> | << not documented >>
>> | ...
>>
>> I also expect similar behavior in 30.0.50.
>>
>> In 30.0.50, it appears that disabled-command-function in
>> novice.el triggers this error by executing (insert nil) for
>> undocumented commands in the following code.
>>
>> | (insert (condition-case ()
>> | (documentation cmd)
>> | (error "<< not documented >>")))
>>
>> Although omitting a docstring is generally considered poor practice,
>> triggering an error for such commands might not be intentional
>> behavior. The corresponding code in 27.1 was as follows:
>>
>> | (... (or (condition-case ()
>> | (documentation cmd)
>> | (error nil))
>> | "<< not documented >>"))
Thanks for the bug report!
This should now be fixed on emacs-29.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 14 Jan 2024 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 157 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.