From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Benjamin Leis via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70614: Wrong simple imenu definition for java Date: Sat, 27 Apr 2024 18:45:10 +0000 Message-ID: Reply-To: Benjamin Leis Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_SN6PR08MB5326F17F77FC76AB8E41AD4A8B152SN6PR08MB5326namp_" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15585"; mail-complaints-to="usenet@ciao.gmane.io" To: 70614@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 28 00:28:02 2024 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 1s0qWY-0003qZ-0e for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Apr 2024 00:28:02 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s0qWH-0000eF-4O; Sat, 27 Apr 2024 18:27:45 -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 1s0qWF-0000dQ-CJ for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2024 18:27:43 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s0qWF-00063X-3j for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2024 18:27:43 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s0qWY-0001al-1y for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2024 18:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Benjamin Leis Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Apr 2024 22:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70614 X-GNU-PR-Package: emacs X-Debbugs-Original-To: "bug-gnu-emacs@gnu.org" Original-Received: via spool by submit@debbugs.gnu.org id=B.17142568466094 (code B ref -1); Sat, 27 Apr 2024 22:28:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Apr 2024 22:27:26 +0000 Original-Received: from localhost ([127.0.0.1]:49777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s0qVu-0001aD-9b for submit@debbugs.gnu.org; Sat, 27 Apr 2024 18:27:25 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:37028) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s0n9y-0004uP-Q4 for submit@debbugs.gnu.org; Sat, 27 Apr 2024 14:52:31 -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 1s0n9Z-0000iq-ON for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2024 14:52:05 -0400 Original-Received: from us-smtp-delivery-129.mimecast.com ([170.10.133.129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s0n9W-0001wH-Tu for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2024 14:52:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=servicenow.com; s=FEB-2024; t=1714243921; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=QCAT//ICrBmZelc6epe7UzbyHJTgKkAcwVXUHk39Mf8=; b=U4noWQ4kbKKim3x/5+3oAUmWwQxheNaf2qTJ0eTaOvgKsMYWi3Cj+D+BVv30b0ftq+F5b9 8mt1l+OW13SNMUqcd6SYxjZYQLEvmByS+02ClsyWMEDQ87zIIpdOod7zjZeoeii6tGeZzU 7Rlgre9GyPsZ0omvxjfrQfKNCXm5RvE= Original-Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2100.outbound.protection.outlook.com [104.47.70.100]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-503-B1Uo-K-SO_GSwuqNeAO96g-1; Sat, 27 Apr 2024 14:45:12 -0400 X-MC-Unique: B1Uo-K-SO_GSwuqNeAO96g-1 Original-Received: from SN6PR08MB5326.namprd08.prod.outlook.com (2603:10b6:805:99::23) by SJ2PR08MB8884.namprd08.prod.outlook.com (2603:10b6:a03:557::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.31; Sat, 27 Apr 2024 18:45:10 +0000 Original-Received: from SN6PR08MB5326.namprd08.prod.outlook.com ([fe80::8b70:a969:f80e:f5f]) by SN6PR08MB5326.namprd08.prod.outlook.com ([fe80::8b70:a969:f80e:f5f%7]) with mapi id 15.20.7519.030; Sat, 27 Apr 2024 18:45:10 +0000 Thread-Topic: Wrong simple imenu definition for java Thread-Index: AQHamNJprPYrBzTtoUevsGgqNElzcw== Accept-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN6PR08MB5326:EE_|SJ2PR08MB8884:EE_ x-ms-office365-filtering-correlation-id: 59e9f3c2-292e-4e05-4299-08dc66ea2a92 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230031|1800799015|366007|376005|38070700009 x-microsoft-antispam-message-info: ms4gZK6Oss5yo2Ix/56XYPXj8peF4ns3PzIqM8KwztA9LX1XIkms5zZ7vYqyjfzsOWXipZETTiW9rmgsrSFAsgzuXnRZaifaP+i66yNtv39tGUy5NdOJjZijPged45RqEwBPzexz51B+ChYl3pqjPQhNiKwZ+CJS0xqT6Fa23QxStu/6ZuwI7lNHbPDak9YRIQZ9tzC4wyzT80IXa4+xoXRaIZQzBm0M4sHOr/GSTZBslR3wATIflpf3gpBSRYIcS9EwT+56t1xBvHuTN6Um/THOQU9KIvVXPHWGDS1oira8JOFjSdThft1HK7/cuyyvCbcY9KfanumUAryBbrX7d8EickZxa3ONmlKtAXLYmI+Gd3Af7A0hhvtzic+KggcvLJ2z7AtNuBVSxx2QkzqeLmspGQKFPydB6cVFlHK/4YKCM9a+5B56CeUUYHz4aF8W8aFh+Y6QPq4SDl2vH+mTcjN3rJ28nZG8KrAAaICPnCzGdTba8BSqQSDcaPJJHvBFPl60EogEYP+gK89D/vYFnXSW13M30bVicxhAS2vZaYapJgmCnLnARGdx1WJy7+Wy/krbraniIQm/gbX4JgcJEiq7SbaOjWOJ/4+BIbCQNE8iFsm7vnPO8naD6sFuRfmKTa/5CQnC9W9A861POHn2KRyOv68YPSqaxles1zAqlvU2Jr5iCcD7HAm/l3VwUCw5Z+VwUVlGDckOD0Vv3B9WcrC/lkwtulIlev0VHoZynRDFjcQXIM/rgaE2+Eeov N0IrrrMBR7n/tUgLhHmvFA8nkB8bMhcsQvCpglkIXGu8iEtsVSSbQjaO2QxnLu1OS0QTYcnoYeOug/rHBeKprchRa+rlOkMz6S x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR08MB5326.namprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(1800799015)(366007)(376005)(38070700009); DIR:OUT; SFP:1101 x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: KR5UPOEcf5TTwNmx2+YgfWMQsj+a43GL8aSiRE+gelzmCVOyZ0+yzNZGOs1kl6S+c4QRcAw8Ko8lXbFszVA9xL84U6XEsvmsOYtD4DWyXM3reuTgKSZA4GwIp2A7tjdMnANpNY6WUOoQwDE+/0ScVnNC7yx1+d8wyAYI3UkzlyTYt9498S8O8gfXyMN/sZ36lIm2mVwPkxPO94Xv7So2k8Vp7HdZqd76bo+sDKiagKE0c26pX7cSMW5YtskQQaPNIxamLFszIwa5/eu0XImtVnqDbOLkVNEVDxY5halQAgQ84K5vVtH9x5cV1Pwl+YOlFhwWPYpuh/ju8DVxNPjBxyUUwwtztumzRGrAWUvJNF/cGM8G69ua+/Idzw4D20wxBScgf+DuQEobRueTt/Ux/ywXLElmGBvh10UeMMYaYIKSGqMuzC+ZGpqovwleJZTOYdB3FvMsNJPCJ9C3YsPhapYl/MRxpkMkLQgW88JazrjjDE4s9R5VsrwMGXgPPEPba2e+AVyvKJg250O2FEWT3wd97liqpAbGf/mM0eX97cok9uXHCxsNqp8DEeEI4oIq0vB4smItGiLc1Gh9XOqHHwhosJZvFb4dBT76hfE+b/JbDVJO686kmJMaUctzhXPQev8liWHQiXhiDmUwoUBK4UIubPakAYhEkCyEl9f9sloJLBhu+Bs1Q502yHasucD5ku3G6DUenvpiFtKO0yUFZh9xPYvHP+ovWz3jrokQHTu3MwHv74mMhNbDF3 7+5yHa+oLJ/XT85c2LdQq8kG7z+G0DLXtMUrHXU6IYbEcx9U03lAEvuvrvnhYUdeuLrtz2LzwTvoWC25BV2SswyLPYtYXzHd4M X-OriginatorOrg: servicenow.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR08MB5326.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 59e9f3c2-292e-4e05-4299-08dc66ea2a92 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Apr 2024 18:45:10.2105 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8bcff170-9979-491e-8683-d8ced0850bad X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Lrry0cEXuoKSfyagQjVsk63fQ+AgXpm5x5a6VeEVMwMQgQoqrnlHro4xw02Xq85o6gMEcphsNYQjPrzPe46eF7qXM6qOSvL822ecBPRj81U= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR08MB8884 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: servicenow.com Content-Language: en-US Received-SPF: pass client-ip=170.10.133.129; envelope-from=benjamin.leis@servicenow.com; helo=us-smtp-delivery-129.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.67, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 27 Apr 2024 18:27:20 -0400 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:284065 Archived-At: --_000_SN6PR08MB5326F17F77FC76AB8E41AD4A8B152SN6PR08MB5326namp_ Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable I noticed the treesitter imenu definitions for java in java-ts-mode.el have= the following: ;; Imenu. (setq-local treesit-simple-imenu-settings '(("Class" \\`class_declaration\\' n= il nil) ("Interface" \\`interface_declaration\\' nil nil) ("Enum" \\`record_declaration\\' = nil nil) ("Method" \\`method_declaration\\' nil nil))) (treesit-major-mode-setup)) The 3rd definition for enums should either be for =93Record=94 if that wa= s the intention or match against \\`enum_declaration = if it really was meant for enums. Ben --_000_SN6PR08MB5326F17F77FC76AB8E41AD4A8B152SN6PR08MB5326namp_ Content-Type: text/html; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable

I noticed the treesitter imenu definitions for java = in java-ts-mode.el have the following:

 

  ;; Imenu.

  (setq-local treesit-simple-imenu-settings

        &nbs= p;     '(("Class" \\`class_declaration\\' nil nil)

        &nbs= p;       ("Interface" \\`interface_declaration\\' nil nil)

        &nbs= p;       ("Enum" \\`record_declaration\\' nil nil)

        &nbs= p;       ("Method" \\`method_declaration\\' nil nil)))

  (treesit-major-mode-setup))

 

  The 3rd definition for enums shoul= d either be for =93Record=94 if that was the intention or match against \\`enum_declaration   if it = really was meant for enums.

 

Ben

--_000_SN6PR08MB5326F17F77FC76AB8E41AD4A8B152SN6PR08MB5326namp_--