unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Hugh Daschbach <hugh@ccss.com>
To: 50051@debbugs.gnu.org
Subject: bug#50051: 28.0.50; easymenu defined popup menus broken since 27.1
Date: Fri, 13 Aug 2021 15:08:55 -0700	[thread overview]
Message-ID: <871r6x6lqg.fsf@ccss.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 4430 bytes --]

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))


[-- Attachment #2: Popup menu test. --]
[-- Type: text/plain, Size: 1711 bytes --]

;;; popup-test.el --- Test popup menu. -*- lexical-binding: t; -*-

(require 'easymenu)

(defvar popup-test-value 0)

(defun popup-test-select (value)
  (message "Selected %s" value)
  (setq popup-test-value value))

(defvar popup-test-menu
  '("popup-test"
    :active t
    "--single-line"
    [0
     (popup-test-select 0)
     :label "Zero"
     :style radio
     :selected (eql 0 popup-test-value)]
    [1
     (popup-test-select 1)
     :label "One"
     :style radio
     :selected (eql 1 popup-test-value)]
    [2
     (popup-test-select 2)
     :label "Two"
     :style radio
     :selected (eql 2 popup-test-value)]
    [3
     (popup-test-select 3)
     :label "Three"
     :style radio 
     :selected (eql 3 popup-test-value)]
    [4
     (popup-test-select 4)
     :label "Four"
     :style radio
     :selected (eql 4 popup-test-value)]))

(easy-menu-define popup-test-show-menu nil "Context sensitive menu" popup-test-menu)

(defun popup-test-action (event)
  (interactive "e")
  (let ((result (popup-test-show-menu event)))
    (popup-test-select (car result))))

(defface popup-test-face
  '((((background dark)) (:foreground "cyan" :background "DimGray"))
    (t (:foreground "DarkRed")))
  "*popup-test demonstration face")

(defvar popup-test-map (make-sparse-keymap))

(define-key popup-test-map [mouse-3] 'popup-test-action)

(let ((buffer (get-buffer-create "*popup-test*")))
  (with-current-buffer buffer
    (erase-buffer)
    (insert (propertize "Right click here."
                        'face 'popup-test-face
                        'keymap popup-test-map
                        'rear-nonsticky t))
    (pop-to-buffer buffer)))

(provide 'popup-test)
;;; popup-test.el ends here

             reply	other threads:[~2021-08-13 22:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-13 22:08 Hugh Daschbach [this message]
2021-08-14 12:39 ` bug#50051: 28.0.50; easymenu defined popup menus broken since 27.1 Lars Ingebrigtsen
2021-08-14 16:24 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-14 16:29   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871r6x6lqg.fsf@ccss.com \
    --to=hugh@ccss.com \
    --cc=50051@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).