GNU bug report logs - #49953
28.0.50; tmm is broken on compiled menus

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Mon, 9 Aug 2021 07:24:02 UTC

Severity: normal

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.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 49953 in the body.
You can then email your comments to 49953 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#49953; Package emacs. (Mon, 09 Aug 2021 07:24:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> linkov.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 09 Aug 2021 07:24:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; tmm is broken on compiled menus
Date: Mon, 09 Aug 2021 10:12:28 +0300
0. emacs -Q
1. Eval: (tmm-prompt (mouse-buffer-menu-keymap))
2. Select a menu item with the mouse click
   from the *Completions* buffer
3. It fails with this backtrace:

Debugger entered--Lisp error: (error "Empty menu reached")
  error("Empty menu reached")
  tmm-prompt((keymap "Select Buffer" [("*scratch* * " . #f(compiled-function () (interactive nil) #<bytecode...
  tmm-prompt((keymap (Select\ Buffer "Select Buffer" keymap ...
  (progn (tmm-prompt (mouse-buffer-menu-keymap)))
  eval((progn (tmm-prompt (mouse-buffer-menu-keymap))) t)
  elisp--eval-last-sexp((4))
  eval-last-sexp((4))
  funcall-interactively(eval-last-sexp (4))
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)

This regression began to occur after merging native-compilation.
It seems the problem is that tmm-get-keymap does very strange things:

	(cond ((if (listp elt)
		   (or (keymapp elt) (eq (car elt) 'lambda))
		 (and (symbolp elt) (fboundp elt)))

I don't know why it checks for 'lambda' and 'symbolp',
but such checks fail on a compiled function.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49953; Package emacs. (Mon, 09 Aug 2021 13:22:01 GMT) Full text and rfc822 format available.

Message #8 received at 49953 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 49953 <at> debbugs.gnu.org
Subject: Re: bug#49953: 28.0.50; tmm is broken on compiled menus
Date: Mon, 09 Aug 2021 15:20:58 +0200
Juri Linkov <juri <at> linkov.net> writes:

> This regression began to occur after merging native-compilation.
> It seems the problem is that tmm-get-keymap does very strange things:
>
> 	(cond ((if (listp elt)
> 		   (or (keymapp elt) (eq (car elt) 'lambda))
> 		 (and (symbolp elt) (fboundp elt)))
>
> I don't know why it checks for 'lambda' and 'symbolp',
> but such checks fail on a compiled function.

Yeah, or why the listp at all...  I think the correct test in all these
cases are (or (keymapp elt) (functionp elt))?  So I've now done that on
the trunk, and that seems to make things work.  But there may be
something subtle here, so I guess we'll see...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 28.1, send any further explanations to 49953 <at> debbugs.gnu.org and Juri Linkov <juri <at> linkov.net> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 09 Aug 2021 13:22:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49953; Package emacs. (Mon, 09 Aug 2021 17:10:02 GMT) Full text and rfc822 format available.

Message #13 received at 49953 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>,
 Stefan Monnier <monnier <at> iro.umontreal.ca> 
Cc: 49953 <at> debbugs.gnu.org, juri <at> linkov.net
Subject: Re: bug#49953: 28.0.50; tmm is broken on compiled menus
Date: Mon, 09 Aug 2021 20:09:52 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Mon, 09 Aug 2021 15:20:58 +0200
> Cc: 49953 <at> debbugs.gnu.org
> 
> Juri Linkov <juri <at> linkov.net> writes:
> 
> > This regression began to occur after merging native-compilation.
> > It seems the problem is that tmm-get-keymap does very strange things:
> >
> > 	(cond ((if (listp elt)
> > 		   (or (keymapp elt) (eq (car elt) 'lambda))
> > 		 (and (symbolp elt) (fboundp elt)))
> >
> > I don't know why it checks for 'lambda' and 'symbolp',
> > but such checks fail on a compiled function.
> 
> Yeah, or why the listp at all...  I think the correct test in all these
> cases are (or (keymapp elt) (functionp elt))?  So I've now done that on
> the trunk, and that seems to make things work.  But there may be
> something subtle here, so I guess we'll see...

I have a vague recollection that at least some of those are used, so I
brought Stefan on-board this discussion, in the hope that he could
show us the light.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49953; Package emacs. (Mon, 09 Aug 2021 18:24:01 GMT) Full text and rfc822 format available.

Message #16 received at 49953 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 49953 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>, juri <at> linkov.net
Subject: Re: bug#49953: 28.0.50; tmm is broken on compiled menus
Date: Mon, 09 Aug 2021 14:23:09 -0400
>> > This regression began to occur after merging native-compilation.
>> > It seems the problem is that tmm-get-keymap does very strange things:
>> >
>> > 	(cond ((if (listp elt)
>> > 		   (or (keymapp elt) (eq (car elt) 'lambda))
>> > 		 (and (symbolp elt) (fboundp elt)))
>> >
>> > I don't know why it checks for 'lambda' and 'symbolp',
>> > but such checks fail on a compiled function.
>> 
>> Yeah, or why the listp at all...  I think the correct test in all these
>> cases are (or (keymapp elt) (functionp elt))?  So I've now done that on
>> the trunk, and that seems to make things work.  But there may be
>> something subtle here, so I guess we'll see...
>
> I have a vague recollection that at least some of those are used, so I
> brought Stefan on-board this discussion, in the hope that he could
> show us the light.

Sorry, my lightbulb is currently out, but I agree that the above test
seems to want to do (or (keymapp elt) (functionp elt)) just in
a clumsy way.


        Stefan





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 07 Sep 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 286 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.