GNU bug report logs - #50051
28.0.50; easymenu defined popup menus broken since 27.1

Previous Next

Package: emacs;

Reported by: Hugh Daschbach <hugh <at> ccss.com>

Date: Fri, 13 Aug 2021 22:10: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 50051 in the body.
You can then email your comments to 50051 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#50051; Package emacs. (Fri, 13 Aug 2021 22:10:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hugh Daschbach <hugh <at> ccss.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 13 Aug 2021 22:10:02 GMT) Full text and rfc822 format available.

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

From: Hugh Daschbach <hugh <at> ccss.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; easymenu defined popup menus broken since 27.1
Date: Fri, 13 Aug 2021 15:08:55 -0700
[Message part 1 (text/plain, inline)]
Invoking a popup menu defined with easymenu results in the following
traceback:

,----
| Debugger entered--Lisp error: (wrong-type-argument listp #f(compiled-function (arg1) (interactive "@e") #<bytecode -0x1b0049559414da65>))
|   x-popup-menu((mouse-3 (#<window 14 on *popup-test*> 7 (58 . 11) 1801985654 nil 7 (6 . 0) nil (4 . 11) (9 . 18))) #f(compiled-function (arg1) (interactive "@e") #<bytecode -0x1b0049559414da65>))
|   popup-test-show-menu((mouse-3 (#<window 14 on *popup-test*> 7 (58 . 11) 1801985654 nil 7 (6 . 0) nil (4 . 11) (9 . 18))))
|   (let ((result (popup-test-show-menu event))) (popup-test-select (car result)))
|   popup-test-action((mouse-3 (#<window 14 on *popup-test*> 7 (58 . 11) 1801985654 nil 7 (6 . 0) nil (4 . 11) (9 . 18))))
|   funcall-interactively(popup-test-action (mouse-3 (#<window 14 on *popup-test*> 7 (58 . 11) 1801985654 nil 7 (6 . 0) nil (4 . 11) (9 . 18))))
|   call-interactively(popup-test-action nil nil)
|   command-execute(popup-test-action)
`----

To reproduce (popup-test.el attached):

emacs -q -Q -l popup-test.el

This opens a window with *popup-tests* buffer.  Right click on the text
"Right click here." to generate the wrong-type-argument error.

This test works with 26.3.  Bisecting the Emacs source tree reveals this
regression was introduced by the first hunk in
a070bd1c8b5213ad469d41dd80d392f924644aed.

Seems odd this has not been reported already.  But I could not find an
existing bug report for this.

Cheers,
Hugh


In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars)
 of 2021-08-13 built on debian-11
Repository revision: c4d34d24e36c7f7c54cf3ec3e5d76e3e8fc005aa
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12012000
System Description: Debian GNU/Linux 11 (bullseye)

Configured using:
 'configure --with-x-toolkit=lucid'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
X11 XAW3D XDBE XIM XPM LUCID ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail
rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map text-property-search time-date
subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
popup-test iso-transl tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar
mouse jit-lock font-lock syntax font-core term/tty-colors frame
minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite charscript charprop case-table epa-hook jka-cmpr-hook help
simple abbrev obarray cl-preloaded nadvice button loaddefs faces
cus-face macroexp files window text-properties overlay sha1 md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify lcms2 dynamic-setting
system-font-setting font-render-setting cairo x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 51530 6812)
 (symbols 48 6620 1)
 (strings 32 18860 1414)
 (string-bytes 1 608630)
 (vectors 16 13422)
 (vector-slots 8 179251 7821)
 (floats 8 27 34)
 (intervals 56 327 0)
 (buffers 992 12))

[popup-test.el (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50051; Package emacs. (Sat, 14 Aug 2021 12:40:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Hugh Daschbach <hugh <at> ccss.com>
Cc: 50051 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#50051: 28.0.50; easymenu defined popup menus broken since 27.1
Date: Sat, 14 Aug 2021 14:39:09 +0200
Hugh Daschbach <hugh <at> ccss.com> writes:

> This opens a window with *popup-tests* buffer.  Right click on the text
> "Right click here." to generate the wrong-type-argument error.
>
> This test works with 26.3.  Bisecting the Emacs source tree reveals this
> regression was introduced by the first hunk in
> a070bd1c8b5213ad469d41dd80d392f924644aed.

Stefan, this was the patch that replaced some lambdas with closures in
easymenu.  I see that parts of that patch was reverted(ish), but not the
bit that's triggering this problem.

Here's the reverted thing:

diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el
index 292d50b91a..15b8bef428 100644
--- a/lisp/emacs-lisp/easymenu.el
+++ b/lisp/emacs-lisp/easymenu.el
@@ -475,7 +475,7 @@ easy-menu-make-symbol
                   ;; `functionp' is probably not needed.
                   (functionp callback) noexp)
               callback
-	    (lambda () (interactive) callback)))
+	    (eval `(lambda () (interactive) ,callback) t)))
     command))
 
I briefly tried to debug the current problem, but it wasn't immediately
clear what the correct fix here would be...

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50051; Package emacs. (Sat, 14 Aug 2021 16:25:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Hugh Daschbach <hugh <at> ccss.com>
Cc: 50051 <at> debbugs.gnu.org
Subject: Re: bug#50051: 28.0.50; easymenu defined popup menus broken since 27.1
Date: Sat, 14 Aug 2021 12:24:20 -0400
> This test works with 26.3.  Bisecting the Emacs source tree reveals this
> regression was introduced by the first hunk in
> a070bd1c8b5213ad469d41dd80d392f924644aed.

Duh... not sure what I was smoking back then, but this commit was
quite odd.
I think I have fixed it, now,


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50051; Package emacs. (Sat, 14 Aug 2021 16:30:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Hugh Daschbach <hugh <at> ccss.com>, 50051 <at> debbugs.gnu.org
Subject: Re: bug#50051: 28.0.50; easymenu defined popup menus broken since 27.1
Date: Sat, 14 Aug 2021 18:29:32 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> Duh... not sure what I was smoking back then, but this commit was
> quite odd.
> I think I have fixed it, now,

:-)

I can confirm that the bug is now gone.

-- 
(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 50051 <at> debbugs.gnu.org and Hugh Daschbach <hugh <at> ccss.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 16 Aug 2021 03:19:01 GMT) Full text and rfc822 format available.

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

This bug report was last modified 4 years and 8 days ago.

Previous Next


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