GNU bug report logs -
#70209
30.0.50; describe key + lambda too poetic
Previous Next
To reply to this bug, email your comments to 70209 AT debbugs.gnu.org.
There is no need to reopen the bug first.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#70209
; Package
emacs
.
(Fri, 05 Apr 2024 04:49:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
No Wayman <iarchivedmywholelife <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 05 Apr 2024 04:49:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.41, cairo version 1.18.0) of 2024-04-02
emacs -Q --batch \
--eval '(global-set-key (kbd "c") (lambda () (interactive) t))' \
--eval '(describe-key "c")' \
--eval '(with-current-buffer "*Help*" (print
(buffer-substring-no-properties (point-min) (point-max))))'
Outputs the following poetry:
"c runs the command #<closure 0FE> (found in global-map), which is
.
It is bound to c.
(anonymous)
"
"which is..."?
What is describe-key trying to tell us?
Is it respecting the function's wish to remain anonymous?
Is it commentary on the limits of descriptive language?
I can only respond with the output of M-x describe-feelings:
"It is bound to c, yet I see a bind:
Though closure mentioned, none I've yet to find."
~ Anonymous
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#70209
; Package
emacs
.
(Fri, 05 Apr 2024 05:08:02 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
See attached patch, which is.
[0001-Include-lambda-type-in-describe-key-output.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#70209
; Package
emacs
.
(Fri, 05 Apr 2024 05:44:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 70209 <at> debbugs.gnu.org (full text, mbox):
> From: No Wayman <iarchivedmywholelife <at> gmail.com>
> Date: Fri, 05 Apr 2024 01:07:39 -0400
>
> See attached patch, which is.
Thanks. Stefan, any comments?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#70209
; Package
emacs
.
(Fri, 05 Apr 2024 11:46:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 70209 <at> debbugs.gnu.org (full text, mbox):
Thank you for your enjoyable bug report and the suggested patch.
> @@ -1102,6 +1102,8 @@ help-fns-function-description-header
> elts nil))
> (setq elts (cdr-safe elts)))
> (concat beg (if is-full "keymap" "sparse keymap"))))
> + ((eq (car-safe def) 'lambda)
> + (concat beg "anonymous Lisp function"))
> (t ""))))
> (with-current-buffer standard-output
> (insert description))
Actually, I think this won't help because in my test the `car` of `def`
is `closure` rather than `lambda`.
I installed the patch below instead.
Stefan
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index a291893e9a2..27011575333 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -1086,13 +1086,6 @@ help-fns-function-description-header
;; need to check macros before functions.
(macrop function))
(concat beg "Lisp macro"))
- ((atom def)
- (let ((type (or (oclosure-type def) (cl-type-of def))))
- (concat beg (format "%s"
- (make-text-button
- (symbol-name type) nil
- 'type 'help-type
- 'help-args (list type))))))
((keymapp def)
(let ((is-full nil)
(elts (cdr-safe def)))
@@ -1102,7 +1095,16 @@ help-fns-function-description-header
elts nil))
(setq elts (cdr-safe elts)))
(concat beg (if is-full "keymap" "sparse keymap"))))
- (t ""))))
+ (t
+ (let ((type
+ (if (and (consp def) (symbolp (car def)))
+ (car def)
+ (or (oclosure-type def) (cl-type-of def)))))
+ (concat beg (format "%s"
+ (make-text-button
+ (symbol-name type) nil
+ 'type 'help-type
+ 'help-args (list type)))))))))
(with-current-buffer standard-output
(insert description))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#70209
; Package
emacs
.
(Fri, 05 Apr 2024 20:59:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 70209 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> Thank you for your enjoyable bug report and the suggested patch.
:)
> Actually, I think this won't help because in my test the `car`
> of `def`
> is `closure` rather than `lambda`.
>
> I installed the patch below instead.
> diff --git a/lisp/help-fns.el b/lisp/help-fns.el
> index a291893e9a2..27011575333 100644
With patch applied, thy *scratch* prepared to itch which I bemoan,
*Help* link replied, its ink ensnared, with "lambda, type
Unknown."[1]
Apostrophized: "Be tossed, repaired, my user-error thrown!"
With paren pride, I then declared a test which I have shown.[2]
Test now revised as thou compared. Composure hath no throne
when teary-eyed, in fear I blared, "My closure! Type Unknown?"
[1]:
emacs -Q --batch \
--eval '(global-set-key (kbd "c") `(lambda () (interactive) t)))'
\
--eval '(describe-key "c")' \
--eval '(with-current-buffer "*Help*"
(forward-button 2)
(push-button)
(print (buffer-substring-no-properties (point-min)
(point-max))))'
Unknown type lambda
[2]:
emacs -Q --batch \
--eval '(global-set-key (kbd "c") (lambda () (interactive) t)))' \
--eval '(describe-key "c")' \
--eval '(with-current-buffer "*Help*"
(forward-button 2)
(push-button)
(print (buffer-substring-no-properties (point-min)
(point-max))))'
Unknown type closure
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#70209
; Package
emacs
.
(Fri, 05 Apr 2024 22:36:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 70209 <at> debbugs.gnu.org (full text, mbox):
> [1]:
> emacs -Q --batch \
> --eval '(global-set-key (kbd "c") `(lambda () (interactive) t)))' \
> --eval '(describe-key "c")' \
> --eval '(with-current-buffer "*Help*"
> (forward-button 2)
> (push-button)
> (print (buffer-substring-no-properties (point-min)
> (point-max))))'
>
> Unknown type lambda
That's mild punishment for quoting a lambda.
> [2]:
> emacs -Q --batch \
> --eval '(global-set-key (kbd "c") (lambda () (interactive) t)))' \
> --eval '(describe-key "c")' \
> --eval '(with-current-buffer "*Help*"
> (forward-button 2)
> (push-button)
> (print (buffer-substring-no-properties (point-min)
> (point-max))))'
>
> Unknown type closure
OK, OK, I relent, it shouldn't be button.
Should be fixed now on `master`, thanks to the handy patch below.
Stefan
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 27011575333..cfe27077055 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -1096,15 +1096,15 @@ help-fns-function-description-header
(setq elts (cdr-safe elts)))
(concat beg (if is-full "keymap" "sparse keymap"))))
(t
- (let ((type
- (if (and (consp def) (symbolp (car def)))
- (car def)
- (or (oclosure-type def) (cl-type-of def)))))
- (concat beg (format "%s"
- (make-text-button
- (symbol-name type) nil
- 'type 'help-type
- 'help-args (list type)))))))))
+ (concat beg (format "%s"
+ (if (and (consp def) (symbolp (car def)))
+ (car def)
+ (let ((type (or (oclosure-type def)
+ (cl-type-of def))))
+ (make-text-button
+ (symbol-name type) nil
+ 'type 'help-type
+ 'help-args (list type))))))))))
(with-current-buffer standard-output
(insert description))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#70209
; Package
emacs
.
(Sat, 06 Apr 2024 05:38:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 70209 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> That's mild punishment for quoting a lambda.
Alas, that form doth quote itself!
A parcel pulled from off the shelf
unfurls a worm somewhat shoddy
when passed betwixt macro's body.
> OK, OK, I relent, it shouldn't be button. Should be fixed now
> on `master`, thanks to the handy patch below.
And though the worm may bore the fruit
thou treat it warm! No frore repute!
Soil tilled from core to clover.
Thy patch doth bring a type of closure.
;; poem.el ends here
Thanks, Stefan
Reply sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
You have taken responsibility.
(Sat, 06 Apr 2024 13:18:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
No Wayman <iarchivedmywholelife <at> gmail.com>
:
bug acknowledged by developer.
(Sat, 06 Apr 2024 13:18:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 70209-done <at> debbugs.gnu.org (full text, mbox):
> Thanks, Stefan
My pleasure, closing,
Stefan
This bug report was last modified 28 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.