GNU bug report logs - #56430
[PATCH] fix broken `imenu--create-keymap` when an item is nil

Previous Next

Package: emacs;

Reported by: Brennan Vincent <brennan <at> umanwizard.com>

Date: Wed, 6 Jul 2022 20:15:02 UTC

Severity: normal

Tags: moreinfo, patch

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Brennan Vincent <brennan <at> umanwizard.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 56430 <at> debbugs.gnu.org
Subject: Re: bug#56430: [PATCH] fix broken `imenu--create-keymap` when an item
 is nil
Date: Thu, 7 Jul 2022 14:18:16 -0400
Yes. That fixes the issue I was observing, too. My original motivation
was that the lsp-mode was failing to launch for Golang files on master.

Both my diff and yours fix that problem.

I have no strong opinion on which diff is better.

On 2022-07-07 14:02, Lars Ingebrigtsen wrote:
>  Content preview:  Brennan Vincent <brennan <at> umanwizard.com> writes: > I actually
>     observed item itself being nil, not just (car item). Does the following simple
>     change fix the problem, then?
>
>  Content analysis details:   (-2.9 points, 5.0 required)
>
>   pts rule name              description
>  ---- ---------------------- --------------------------------------------------
>  -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
>  -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
>                              [score: 0.0000]
> X-Fes-Encrypted: true
> X-Fes-Ehlo-Domain: quimby.gnus.org
>
> Brennan Vincent <brennan <at> umanwizard.com> writes:
>
>> I actually observed item itself being nil, not just (car item).
>
> Does the following simple change fix the problem, then?
>
> diff --git a/lisp/imenu.el b/lisp/imenu.el
> index 040e373fb4..dcd816cb7a 100644
> --- a/lisp/imenu.el
> +++ b/lisp/imenu.el
> @@ -471,7 +471,7 @@ imenu--create-keymap
>                       (t
>                        (lambda () (interactive)
>                          (if cmd (funcall cmd item) item))))))
> -              alist)))
> +              (seq-filter #'identity alist))))
>
>  (defun imenu--in-alist (str alist)
>    "Check whether the string STR is contained in multi-level ALIST."
>
>
> --




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

Previous Next


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