[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#63759: 29.0.91; dockerfile-ts-mode--imenu returns invalid index
From: |
Randy Taylor |
Subject: |
bug#63759: 29.0.91; dockerfile-ts-mode--imenu returns invalid index |
Date: |
Sun, 28 May 2023 00:57:03 +0000 |
On Saturday, May 27th, 2023 at 14:33, Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Jimmy Yuen Ho Wong wyuenho@gmail.com
>
> > Date: Sat, 27 May 2023 18:38:29 +0100
> >
> > Reproduction:
> >
> > 0. Open a Emacs GUI, i.e. NS port
> > 1. C-x C-f /some/nonexistent/Dockerfile
> > 2. M-x toggle-debug-on-error
> > 2. M-x imenu-add-menubar-index
> > 3. Click on the Index > Stage menu item
> > 4. Observe the following error pops up
> >
> > Expectation:
> >
> > If the dockerfile-ts-mode buffer is empty, there should not be an extra
> > item preset in the imenu index that when clicked on will jump to a
> > non-existent location and result in an error.
> >
> > `Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
> > imenu-default-goto-function("Stage" nil) imenu(("Stage" nil
> > imenu-default-goto-function)) imenu(("Stage"))
> > imenu--menubar-select(("Stage")) #f(compiled-function () (interactive nil)
> > #<bytecode 0xcfe8182542f4cbd>)() funcall-interactively(#f(compiled-function
> > () (interactive nil) #<bytecode 0xcfe8182542f4cbd>)) #<subr
> > call-interactively>(#f(compiled-function () (interactive nil) #<bytecode
> > 0xcfe8182542f4cbd>) nil nil)
> > call-interactively@ido-cr+-record-current-command(#<subr
> > call-interactively> #f(compiled-function () (interactive nil) #<bytecode
> > 0xcfe8182542f4cbd>) nil nil)
> > apply(call-interactively@ido-cr+-record-current-command #<subr
> > call-interactively> (#f(compiled-function () (interactive nil) #<bytecode
> > 0xcfe8182542f4cbd>) nil nil)) call-interactively(#f(compiled-function ()
> > (interactive nil) #<bytecode 0xcfe8182542f4cbd>) nil nil)
> > command-execute(#f(compiled-function () (interactive nil) #<bytecode
> > 0xcfe8182542f4cbd>))`
>
>
> Thanks.
>
> Randy, can you p-lease look into this?
Thanks for the report Jimmy.
Patch attached.
0001-dockerfile-ts-mode-Prevent-empty-categories-in-imenu.patch
Description: Text Data