From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.bugs Subject: bug#56185: 29.0.50; imenu with imenu-use-popup-menu fails for *Rescan* item Date: Fri, 24 Jun 2022 18:38:39 +0530 Message-ID: <87y1xmw6nc.fsf@gmail.com> References: <87h74a7044.fsf@gmail.com> <8735fuqmvx.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21592"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 56185@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 24 15:09:12 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o4j3g-0005QO-Ik for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Jun 2022 15:09:12 +0200 Original-Received: from localhost ([::1]:37558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4j3f-0007kF-4T for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Jun 2022 09:09:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58864) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4j3X-0007jt-4B for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2022 09:09:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47468) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o4j3W-0007eZ-RP for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2022 09:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o4j3W-0004t1-Mp for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2022 09:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Visuwesh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Jun 2022 13:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56185 X-GNU-PR-Package: emacs Original-Received: via spool by 56185-submit@debbugs.gnu.org id=B56185.165607614018767 (code B ref 56185); Fri, 24 Jun 2022 13:09:02 +0000 Original-Received: (at 56185) by debbugs.gnu.org; 24 Jun 2022 13:09:00 +0000 Original-Received: from localhost ([127.0.0.1]:41364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4j3T-0004sc-Tz for submit@debbugs.gnu.org; Fri, 24 Jun 2022 09:09:00 -0400 Original-Received: from mail-pg1-f194.google.com ([209.85.215.194]:36794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4j3P-0004sM-Mq for 56185@debbugs.gnu.org; Fri, 24 Jun 2022 09:08:58 -0400 Original-Received: by mail-pg1-f194.google.com with SMTP id s185so2392951pgs.3 for <56185@debbugs.gnu.org>; Fri, 24 Jun 2022 06:08:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=lvytc5kmecExNVQ5rl91eDCUerPbVLFhMn7pG63I8Q0=; b=LHe56mD45QuZeBlcpGeRrA+pARlO+vgQW0Xg7KcLwov71sjM78CZzPgeZCXsyO8icG 6I1m6E0PrNmIPGvr4hh1qf0/QE+vUvwWarp32jqk5A4EVWpPi0fPCS9QGPw3IE9+H+lY mD92QxyC1bgSogvIfwHCBn1ALYJlo0riz5651PRW/xU8zbJ0Nizds4NUzwegnovrJ1SU Auc7JEEXGhO67C4dnFcQvx7YgJTUoAj699jEc63pqVYlZLCfsVwzzHMRigxH15oTosMe HiCUocBkcyXWedi9cQVgpeqqPJEgek2v7bEI12Nh/AXc1stLVgz0P4nWF2SRXQkVTFUj 4ZAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=lvytc5kmecExNVQ5rl91eDCUerPbVLFhMn7pG63I8Q0=; b=GBEL9UX8JZEqnWXKzlHwmc3G/cr5pYXN/uXQlJ37iS49P+4r7NN9U6lIMebcOnmjbJ QGFeaw57piyCKHLq3cjAX5ZxA4V58GqT0EEJl16fZI8TVzheEOfkbZmz99xrPV6GnxNK +bb6haD1bDKtQtnDZKzByU8V/ugShZIf3rq0s2Ck3bwAKsZP/fJlBnemjD0fvLMx6INi cekmc21CMvMAsmR9KaVJlQ8EHUuVdcVH0eYDgL+qUv6sbth5TepD1Qm+B0CoyRQIzdcf cv1JOyjBJz0rRVeyyHX0R2KGWmZDusixoStW9h9EZ3nnslS5KfSBMYzQCYIlICrNWLao y9dQ== X-Gm-Message-State: AJIora+mmga61uITGaZ75x0qjQYapInObnp7DEwn+LQaUS3ptNqDZlvf 3yrBS1CTG+VbDYVWf3r8mXc= X-Google-Smtp-Source: AGRyM1vslKqr+ZPeSI0r/aVoUMlOJowzOHlyJIcRzDZp5xyWZdyWZPCqM2p6UMYGlGsvBXzMpXRJPg== X-Received: by 2002:a63:b70a:0:b0:40c:40b2:f001 with SMTP id t10-20020a63b70a000000b0040c40b2f001mr11688580pgf.460.1656076129643; Fri, 24 Jun 2022 06:08:49 -0700 (PDT) Original-Received: from localhost ([49.204.128.184]) by smtp.gmail.com with ESMTPSA id a20-20020a621a14000000b005251bea0d53sm1654434pfa.83.2022.06.24.06.08.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jun 2022 06:08:48 -0700 (PDT) In-Reply-To: <8735fuqmvx.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 24 Jun 2022 14:14:26 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:235179 Archived-At: [=E0=AE=B5=E0=AF=86=E0=AE=B3=E0=AF=8D=E0=AE=B3=E0=AE=BF =E0=AE=9C=E0=AF=82= =E0=AE=A9=E0=AF=8D 24, 2022] Lars Ingebrigtsen wrote: > Visuwesh 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-funct= ion () (interactive nil) #)) ("x" "x" . #f(co= mpiled-function () (interactive nil) #)) ("y"= "y" . #f(compiled-function () (interactive nil) #))) ["*Rescan*"]) >> popup-menu((keymap "sh" ("*Rescan*" "*Rescan*" . #f(compiled-funct= ion () (interactive nil) #)) ("x" "x" . #f(co= mpiled-function () (interactive nil) #)) ("y"= "y" . #f(compiled-function () (interactive nil) #))) 105) >> imenu--mouse-menu((("*Rescan*" . -99) ("x" . #)= ("y" . #)) 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... Thanks, it works now but now I'm wondering if the change will pollute the obarray? Also can `intern' fail at any point because imenu is also used by text-modes like org-mode whose heading can have any ol' character---a quick test in an org file seems to have no problem however, but I'm interested to know regardless.