unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Visuwesh <visuweshm@gmail.com>
Cc: 56185@debbugs.gnu.org
Subject: bug#56185: 29.0.50; imenu with imenu-use-popup-menu fails for *Rescan* item
Date: Fri, 24 Jun 2022 14:14:26 +0200	[thread overview]
Message-ID: <8735fuqmvx.fsf@gnus.org> (raw)
In-Reply-To: <87h74a7044.fsf@gmail.com> (Visuwesh's message of "Fri, 24 Jun 2022 17:18:59 +0530")

Visuwesh <visuweshm@gmail.com> writes:

> When imenu-use-popup-menu is non-nil and one selects the *Rescan* item,
> imenu fails with the following backtrace,
>
>     Debugger entered--Lisp error: (error "Invalid `key-parse' syntax: %S" ["*Rescan*"])
>       lookup-key((keymap "sh" ("*Rescan*" "*Rescan*" . #f(compiled-function () (interactive nil) #<bytecode -0x1823bf90e9c446ac>)) ("x" "x" . #f(compiled-function () (interactive nil) #<bytecode -0x19fbbb6b7dca5348>)) ("y" "y" . #f(compiled-function () (interactive nil) #<bytecode -0x19fbbb6b7da17348>))) ["*Rescan*"])
>       popup-menu((keymap "sh" ("*Rescan*" "*Rescan*" . #f(compiled-function () (interactive nil) #<bytecode -0x1823bf90e9c446ac>)) ("x" "x" . #f(compiled-function () (interactive nil) #<bytecode -0x19fbbb6b7dca5348>)) ("y" "y" . #f(compiled-function () (interactive nil) #<bytecode -0x19fbbb6b7da17348>))) 105)
>       imenu--mouse-menu((("*Rescan*" . -99) ("x" . #<marker at 1 in sh>) ("y" . #<marker at 7 in sh>)) 105)

I think something has gone missing here over the years?  Or I'm
misreading the commits; that's also possible.

We basically end up with this:

(lookup-key
 '(keymap "sh"
	  ("*Rescan*" "*Rescan*" . ignore))
 ["*Rescan*"])

Which now signals an error; in Emacs 28 it just silently returned nil.
But the problem here is that that's not a valid menu syntax -- the first
element should be a symbol, not a string.  So I've now fixed that in
Emacs 29, which makes this work.  But I'm wondering whether there's
something more er fundamentally wrong somewhere...

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





  reply	other threads:[~2022-06-24 12:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-24 11:48 bug#56185: 29.0.50; imenu with imenu-use-popup-menu fails for *Rescan* item Visuwesh
2022-06-24 12:14 ` Lars Ingebrigtsen [this message]
2022-06-24 13:08   ` Visuwesh
2022-06-24 13:12     ` Lars Ingebrigtsen
2022-06-24 13:19       ` Visuwesh

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=8735fuqmvx.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=56185@debbugs.gnu.org \
    --cc=visuweshm@gmail.com \
    /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).