GNU bug report logs -
#78593
31.0.50; describe-key broken on interactive lambdas
Previous Next
Reported by: Madhu <enometh <at> meer.net>
Date: Mon, 26 May 2025 15:48:01 UTC
Severity: normal
Found in version 31.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
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 78593 in the body.
You can then email your comments to 78593 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#78593
; Package
emacs
.
(Mon, 26 May 2025 15:48:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Madhu <enometh <at> meer.net>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 26 May 2025 15:48:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
On recent master, but this seems to have been broken for a while:
$ emacs -Q -eval '(define-key global-map (kbd "<f11>") (lambda () (interactive) (bury-buffer)))'
C-h v <f11>
throws an error:
function-get: Wrong type argument: symbolp, #[nil ((bury-buffer)) (t) nil nil nil]
Acktually the *Help* buffer is formatted with sufficient information,
but the error prevents it from being displayed.
-- Madhu
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78593
; Package
emacs
.
(Mon, 26 May 2025 16:47:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 78593 <at> debbugs.gnu.org (full text, mbox):
> Date: Mon, 26 May 2025 21:16:22 +0530 (IST)
> From: Madhu <enometh <at> meer.net>
>
> On recent master, but this seems to have been broken for a while:
>
> $ emacs -Q -eval '(define-key global-map (kbd "<f11>") (lambda () (interactive) (bury-buffer)))'
>
> C-h v <f11>
>
> throws an error:
>
> function-get: Wrong type argument: symbolp, #[nil ((bury-buffer)) (t) nil nil nil]
>
> Acktually the *Help* buffer is formatted with sufficient information,
> but the error prevents it from being displayed.
Thanks.
Stefan, this is due to your change:
commit a4ec9ca12969018cdf15b8cc713b3ba054326f99
Author: Stefan Kangas <stefankangas <at> gmail.com>
AuthorDate: Tue Apr 1 21:25:33 2025 +0200
Commit: Stefan Kangas <stefankangas <at> gmail.com>
CommitDate: Tue Apr 1 21:25:33 2025 +0200
function-put: signal error with non-symbol
* lisp/subr.el (function-get): Signal an error if given a non-symbol
for consistency with 'get'.
* test/lisp/subr-tests.el (subr-butlast): Test for the above.
Any reasons not to revert that? function-get correctly returns nil if
its argument is not a symbol, so why should this signal an error?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78593
; Package
emacs
.
(Sat, 07 Jun 2025 08:41:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 78593 <at> debbugs.gnu.org (full text, mbox):
Ping! Stefan, please chime in.
> Cc: 78593 <at> debbugs.gnu.org
> Date: Mon, 26 May 2025 19:46:21 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
>
> > Date: Mon, 26 May 2025 21:16:22 +0530 (IST)
> > From: Madhu <enometh <at> meer.net>
> >
> > On recent master, but this seems to have been broken for a while:
> >
> > $ emacs -Q -eval '(define-key global-map (kbd "<f11>") (lambda () (interactive) (bury-buffer)))'
> >
> > C-h v <f11>
> >
> > throws an error:
> >
> > function-get: Wrong type argument: symbolp, #[nil ((bury-buffer)) (t) nil nil nil]
> >
> > Acktually the *Help* buffer is formatted with sufficient information,
> > but the error prevents it from being displayed.
>
> Thanks.
>
> Stefan, this is due to your change:
>
> commit a4ec9ca12969018cdf15b8cc713b3ba054326f99
> Author: Stefan Kangas <stefankangas <at> gmail.com>
> AuthorDate: Tue Apr 1 21:25:33 2025 +0200
> Commit: Stefan Kangas <stefankangas <at> gmail.com>
> CommitDate: Tue Apr 1 21:25:33 2025 +0200
>
> function-put: signal error with non-symbol
>
> * lisp/subr.el (function-get): Signal an error if given a non-symbol
> for consistency with 'get'.
> * test/lisp/subr-tests.el (subr-butlast): Test for the above.
>
> Any reasons not to revert that? function-get correctly returns nil if
> its argument is not a symbol, so why should this signal an error?
>
>
>
>
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Sat, 28 Jun 2025 09:07:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Madhu <enometh <at> meer.net>
:
bug acknowledged by developer.
(Sat, 28 Jun 2025 09:07:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 78593-done <at> debbugs.gnu.org (full text, mbox):
> Cc: 78593 <at> debbugs.gnu.org, enometh <at> meer.net
> Date: Sat, 07 Jun 2025 11:40:32 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
>
> Ping! Stefan, please chime in.
>
> > Cc: 78593 <at> debbugs.gnu.org
> > Date: Mon, 26 May 2025 19:46:21 +0300
> > From: Eli Zaretskii <eliz <at> gnu.org>
> >
> > > Date: Mon, 26 May 2025 21:16:22 +0530 (IST)
> > > From: Madhu <enometh <at> meer.net>
> > >
> > > On recent master, but this seems to have been broken for a while:
> > >
> > > $ emacs -Q -eval '(define-key global-map (kbd "<f11>") (lambda () (interactive) (bury-buffer)))'
> > >
> > > C-h v <f11>
> > >
> > > throws an error:
> > >
> > > function-get: Wrong type argument: symbolp, #[nil ((bury-buffer)) (t) nil nil nil]
> > >
> > > Acktually the *Help* buffer is formatted with sufficient information,
> > > but the error prevents it from being displayed.
> >
> > Thanks.
> >
> > Stefan, this is due to your change:
> >
> > commit a4ec9ca12969018cdf15b8cc713b3ba054326f99
> > Author: Stefan Kangas <stefankangas <at> gmail.com>
> > AuthorDate: Tue Apr 1 21:25:33 2025 +0200
> > Commit: Stefan Kangas <stefankangas <at> gmail.com>
> > CommitDate: Tue Apr 1 21:25:33 2025 +0200
> >
> > function-put: signal error with non-symbol
> >
> > * lisp/subr.el (function-get): Signal an error if given a non-symbol
> > for consistency with 'get'.
> > * test/lisp/subr-tests.el (subr-butlast): Test for the above.
> >
> > Any reasons not to revert that? function-get correctly returns nil if
> > its argument is not a symbol, so why should this signal an error?
No further comments, so I've now reverted the offending commit, and
I'm closing this bug.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78593
; Package
emacs
.
(Sat, 28 Jun 2025 16:01:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 78593 <at> debbugs.gnu.org (full text, mbox):
> Stefan, this is due to your change:
>
> commit a4ec9ca12969018cdf15b8cc713b3ba054326f99
> Author: Stefan Kangas <stefankangas <at> gmail.com>
> AuthorDate: Tue Apr 1 21:25:33 2025 +0200
> Commit: Stefan Kangas <stefankangas <at> gmail.com>
> CommitDate: Tue Apr 1 21:25:33 2025 +0200
>
> function-put: signal error with non-symbol
>
> * lisp/subr.el (function-get): Signal an error if given a non-symbol
> for consistency with 'get'.
> * test/lisp/subr-tests.el (subr-butlast): Test for the above.
>
> Any reasons not to revert that? function-get correctly returns nil if
> its argument is not a symbol, so why should this signal an error?
IMO, `function-get/put` should accept *functions* as arguments, not
just symbols.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78593
; Package
emacs
.
(Sat, 28 Jun 2025 19:09:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 78593 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: Madhu <enometh <at> meer.net>, Stefan Kangas <stefankangas <at> gmail.com>,
> 78593 <at> debbugs.gnu.org
> Date: Sat, 28 Jun 2025 12:00:01 -0400
>
> > Stefan, this is due to your change:
> >
> > commit a4ec9ca12969018cdf15b8cc713b3ba054326f99
> > Author: Stefan Kangas <stefankangas <at> gmail.com>
> > AuthorDate: Tue Apr 1 21:25:33 2025 +0200
> > Commit: Stefan Kangas <stefankangas <at> gmail.com>
> > CommitDate: Tue Apr 1 21:25:33 2025 +0200
> >
> > function-put: signal error with non-symbol
> >
> > * lisp/subr.el (function-get): Signal an error if given a non-symbol
> > for consistency with 'get'.
> > * test/lisp/subr-tests.el (subr-butlast): Test for the above.
> >
> > Any reasons not to revert that? function-get correctly returns nil if
> > its argument is not a symbol, so why should this signal an error?
>
> IMO, `function-get/put` should accept *functions* as arguments, not
> just symbols.
Not sure I understand: are you saying that it was wrong for me to
revert that commit?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78593
; Package
emacs
.
(Sat, 28 Jun 2025 21:21:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 78593 <at> debbugs.gnu.org (full text, mbox):
>> > Stefan, this is due to your change:
>> >
>> > commit a4ec9ca12969018cdf15b8cc713b3ba054326f99
>> > Author: Stefan Kangas <stefankangas <at> gmail.com>
>> > AuthorDate: Tue Apr 1 21:25:33 2025 +0200
>> > Commit: Stefan Kangas <stefankangas <at> gmail.com>
>> > CommitDate: Tue Apr 1 21:25:33 2025 +0200
>> >
>> > function-put: signal error with non-symbol
>> >
>> > * lisp/subr.el (function-get): Signal an error if given a non-symbol
>> > for consistency with 'get'.
>> > * test/lisp/subr-tests.el (subr-butlast): Test for the above.
>> >
>> > Any reasons not to revert that? function-get correctly returns nil if
>> > its argument is not a symbol, so why should this signal an error?
>>
>> IMO, `function-get/put` should accept *functions* as arguments, not
>> just symbols.
>
> Not sure I understand: are you saying that it was wrong for me to
> revert that commit?
No, but just pointing out that signaling errors for functions which are
not symbols was the core of the problem. It's probably OK to signal
errors for values which are not functions at all. Not sure if it's
worth the trouble, OTOH.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78593
; Package
emacs
.
(Sat, 28 Jun 2025 22:28:03 GMT)
Full text and
rfc822 format available.
Message #28 received at 78593 <at> debbugs.gnu.org (full text, mbox):
"Stefan Monnier via \"Bug reports for GNU Emacs, the Swiss army knife of text editors\"" <bug-gnu-emacs <at> gnu.org> writes:
>>> > Stefan, this is due to your change:
>>> >
>>> > commit a4ec9ca12969018cdf15b8cc713b3ba054326f99
>>> > Author: Stefan Kangas <stefankangas <at> gmail.com>
>>> > AuthorDate: Tue Apr 1 21:25:33 2025 +0200
>>> > Commit: Stefan Kangas <stefankangas <at> gmail.com>
>>> > CommitDate: Tue Apr 1 21:25:33 2025 +0200
>>> >
>>> > function-put: signal error with non-symbol
>>> >
>>> > * lisp/subr.el (function-get): Signal an error if given a non-symbol
>>> > for consistency with 'get'.
>>> > * test/lisp/subr-tests.el (subr-butlast): Test for the above.
>>> >
>>> > Any reasons not to revert that? function-get correctly returns nil if
>>> > its argument is not a symbol, so why should this signal an error?
>>>
>>> IMO, `function-get/put` should accept *functions* as arguments, not
>>> just symbols.
I'm a bit confused about function-put: are you saying that all functions
should have a plist (in a weak hash table?) that function-put
manipulates, or that we should silently ignore attempts to set a
function property on a non-symbol?
Pip
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78593
; Package
emacs
.
(Sat, 28 Jun 2025 22:29:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78593
; Package
emacs
.
(Sat, 28 Jun 2025 23:11:02 GMT)
Full text and
rfc822 format available.
Message #34 received at 78593 <at> debbugs.gnu.org (full text, mbox):
>>>> IMO, `function-get/put` should accept *functions* as arguments, not
>>>> just symbols.
> I'm a bit confused about function-put: are you saying that all functions
> should have a plist (in a weak hash table?) that function-put
> manipulates,
Well, how to make it work for non-symbol functions is up in the air.
But I'm just saying that we shouldn't *necessarily* disallow it (as
long as we can make it work).
The weak hash-table is what we do for `set-advertised-calling-convention`.
> or that we should silently ignore attempts to set a function property
> on a non-symbol?
I don't have a clear opinion on that.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78593
; Package
emacs
.
(Sun, 29 Jun 2025 04:56:01 GMT)
Full text and
rfc822 format available.
Message #37 received at 78593 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: enometh <at> meer.net, stefankangas <at> gmail.com, 78593 <at> debbugs.gnu.org
> Date: Sat, 28 Jun 2025 17:20:33 -0400
>
> >> > Stefan, this is due to your change:
> >> >
> >> > commit a4ec9ca12969018cdf15b8cc713b3ba054326f99
> >> > Author: Stefan Kangas <stefankangas <at> gmail.com>
> >> > AuthorDate: Tue Apr 1 21:25:33 2025 +0200
> >> > Commit: Stefan Kangas <stefankangas <at> gmail.com>
> >> > CommitDate: Tue Apr 1 21:25:33 2025 +0200
> >> >
> >> > function-put: signal error with non-symbol
> >> >
> >> > * lisp/subr.el (function-get): Signal an error if given a non-symbol
> >> > for consistency with 'get'.
> >> > * test/lisp/subr-tests.el (subr-butlast): Test for the above.
> >> >
> >> > Any reasons not to revert that? function-get correctly returns nil if
> >> > its argument is not a symbol, so why should this signal an error?
> >>
> >> IMO, `function-get/put` should accept *functions* as arguments, not
> >> just symbols.
> >
> > Not sure I understand: are you saying that it was wrong for me to
> > revert that commit?
>
> No, but just pointing out that signaling errors for functions which are
> not symbols was the core of the problem.
I agree.
> It's probably OK to signal errors for values which are not functions
> at all. Not sure if it's worth the trouble, OTOH.
Ah, so you are saying that symbolp should have been functionp? But
does functionp indeed return non-nil for all the function types for
which we want function-get to do its job? E.g., what about macros of
special forms?
Or do we have another predicate that would cover all the cases?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78593
; Package
emacs
.
(Sun, 29 Jun 2025 05:02:04 GMT)
Full text and
rfc822 format available.
Message #40 received at 78593 <at> debbugs.gnu.org (full text, mbox):
>> It's probably OK to signal errors for values which are not functions
>> at all. Not sure if it's worth the trouble, OTOH.
> Ah, so you are saying that symbolp should have been functionp? But
> does functionp indeed return non-nil for all the function types for
> which we want function-get to do its job? E.g., what about macros of
> special forms?
> Or do we have another predicate that would cover all the cases?
That's what I meant by "Not sure if it's worth the trouble".
Stefan
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 27 Jul 2025 11:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 13 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.