From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Randy Taylor Newsgroups: gmane.emacs.bugs Subject: bug#63759: 29.0.91; dockerfile-ts-mode--imenu returns invalid index Date: Sun, 28 May 2023 00:57:03 +0000 Message-ID: <3L3FD8w6qqIZzCOUi2VZg1RNgfSDljIQvLCNffR0X9_waGZ1dWIiwyHZoiK-Nkv19wAwKy8PULK5RLDU82cAAQ2OV3ivxGCCdLn4TBVMYNA=@rjt.dev> References: <83y1l9ipxx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_3bB5jDpf6LULVZvsWYTlzjWFVU19DoBb228vZOphk" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3176"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Jimmy Yuen Ho Wong , 63759@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 28 02:58:30 2023 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 1q34jt-0000cT-Br for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 May 2023 02:58:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q34jU-0000OY-OK; Sat, 27 May 2023 20:58:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q34jS-0000O4-N4 for bug-gnu-emacs@gnu.org; Sat, 27 May 2023 20:58:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q34jS-0007zy-D4 for bug-gnu-emacs@gnu.org; Sat, 27 May 2023 20:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q34jR-0007af-O2 for bug-gnu-emacs@gnu.org; Sat, 27 May 2023 20:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Randy Taylor Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 May 2023 00:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63759 X-GNU-PR-Package: emacs Original-Received: via spool by 63759-submit@debbugs.gnu.org id=B63759.168523544429127 (code B ref 63759); Sun, 28 May 2023 00:58:01 +0000 Original-Received: (at 63759) by debbugs.gnu.org; 28 May 2023 00:57:24 +0000 Original-Received: from localhost ([127.0.0.1]:52762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q34ip-0007Zj-PO for submit@debbugs.gnu.org; Sat, 27 May 2023 20:57:24 -0400 Original-Received: from mail-4323.proton.ch ([185.70.43.23]:45449) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q34io-0007ZU-93 for 63759@debbugs.gnu.org; Sat, 27 May 2023 20:57:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev; s=protonmail3; t=1685235435; x=1685494635; bh=M7IwkECosO1w9Wf21HDx9CMNwGqFqUIYUCRhckXBpqU=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=zXvFOEKQQFkT5mXH2jKrHGW0kOVSI6q5fNecB6QaCTEhioo4qyBdLU1vwzwIgmHpq i/MEmOlLkCstPzEOFHMn/uD8ucP6JdEIiuewAMTuDuOmpR3D+E1pnGGnmu4QYy6zbt RGlVIqdyp0M2SB7VX31HpZbt5Q9k0lt0WNQ27LoM3m4i8ySpggYbGjTKn5BcQvDqVG bWQ+k4y2WjuMLI2N8R9Qd9h/3Er4/4OP/Y4KJeh16wmr3dSvJk0SKmWQcRjOQ454Yp 6iMHwoNsUCYJcimfZ4P2LNuEDhuKMKkKQP/8N2yVMgOxjh52t9Oo+Dlm4mZ5LV4MYM sPu3DpyU2xzMQ== In-Reply-To: <83y1l9ipxx.fsf@gnu.org> Feedback-ID: 44397038:user:proton 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:262495 Archived-At: This is a multi-part message in MIME format. --b1_3bB5jDpf6LULVZvsWYTlzjWFVU19DoBb228vZOphk Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Saturday, May 27th, 2023 at 14:33, Eli Zaretskii wrote: > > From: Jimmy Yuen Ho Wong wyuenho@gmail.com >=20 > > Date: Sat, 27 May 2023 18:38:29 +0100 > >=20 > > Reproduction: > >=20 > > 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 > >=20 > > Expectation: > >=20 > > 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. > >=20 > > `Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p = nil) imenu-default-goto-function("Stage" nil) imenu(("Stage" nil imenu-defa= ult-goto-function)) imenu(("Stage")) imenu--menubar-select(("Stage")) #f(co= mpiled-function () (interactive nil) #)() funca= ll-interactively(#f(compiled-function () (interactive nil) #)) #(#f(compiled-function () (interac= tive nil) #) nil nil) call-interactively@ido-cr= +-record-current-command(# #f(compiled-function ()= (interactive nil) #) nil nil) apply(call-inter= actively@ido-cr+-record-current-command # (#f(comp= iled-function () (interactive nil) #) nil nil))= call-interactively(#f(compiled-function () (interactive nil) #) nil nil) command-execute(#f(compiled-function () (interac= tive nil) #))` >=20 >=20 > Thanks. >=20 > Randy, can you p-lease look into this? Thanks for the report Jimmy. Patch attached. --b1_3bB5jDpf6LULVZvsWYTlzjWFVU19DoBb228vZOphk Content-Type: text/x-patch; name=0001-dockerfile-ts-mode-Prevent-empty-categories-in-imenu.patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=0001-dockerfile-ts-mode-Prevent-empty-categories-in-imenu.patch RnJvbSA0NzlkNDc0MTUzYTcxNzUzMzkxYWUzMzIzNDE2Y2RhZGZlNzk2MzhkIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBSYW5keSBUYXlsb3IgPGRldkByanQuZGV2PgpEYXRlOiBTYXQs IDI3IE1heSAyMDIzIDIwOjUyOjM3IC0wNDAwClN1YmplY3Q6IFtQQVRDSF0gZG9ja2VyZmlsZS10 cy1tb2RlOiBQcmV2ZW50IGVtcHR5IGNhdGVnb3JpZXMgaW4gaW1lbnUKIChCdWcjNjM3NTkpCgoq IGxpc3AvcHJvZ21vZGVzL2RvY2tlcmZpbGUtdHMtbW9kZS5lbCAoZG9ja2VyZmlsZS10cy1tb2Rl LS1pbWVudSk6CkRvbid0IGluY2x1ZGUgZW1wdHkgY2F0ZWdvcmllcy4KLS0tCiBsaXNwL3Byb2dt b2Rlcy9kb2NrZXJmaWxlLXRzLW1vZGUuZWwgfCA2ICsrKystLQogMSBmaWxlIGNoY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