emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#67835: closed (30.0.50; Error with undocumented disabled commands)


From: GNU bug Tracking System
Subject: bug#67835: closed (30.0.50; Error with undocumented disabled commands)
Date: Sat, 16 Dec 2023 19:38:02 +0000

Your message dated Sat, 16 Dec 2023 11:37:13 -0800
with message-id 
<CADwFkmm=fPkUoXuJGUMwpj4pGXEWPaNjVt-ayttaR98dy59Zxw@mail.gmail.com>
and subject line Re: bug#67835: 30.0.50; Error with undocumented disabled 
commands
has caused the debbugs.gnu.org bug report #67835,
regarding 30.0.50; Error with undocumented disabled commands
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
67835: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=67835
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 30.0.50; Error with undocumented disabled commands Date: Fri, 15 Dec 2023 19:45:13 +0900 User-agent: User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.1 Mule/6.0 (HANACHIRUSATO)
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



--- End Message ---
--- Begin Message --- Subject: Re: bug#67835: 30.0.50; Error with undocumented disabled commands Date: Sat, 16 Dec 2023 11:37:13 -0800
Version: 29.2

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Fri, 15 Dec 2023 19:45:13 +0900
>> From: kakkokakko@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.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]