GNU bug report logs - #62043
[PATCH] Fix enums appearing as structs in c-ts-base-mode's imenu

Previous Next

Package: emacs;

Reported by: Randy Taylor <dev <at> rjt.dev>

Date: Wed, 8 Mar 2023 01:51:02 UTC

Severity: normal

Tags: patch

Done: Randy Taylor <dev <at> rjt.dev>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 62043 in the body.
You can then email your comments to 62043 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to casouri <at> gmail.com, bug-gnu-emacs <at> gnu.org:
bug#62043; Package emacs. (Wed, 08 Mar 2023 01:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Randy Taylor <dev <at> rjt.dev>:
New bug report received and forwarded. Copy sent to casouri <at> gmail.com, bug-gnu-emacs <at> gnu.org. (Wed, 08 Mar 2023 01:51:02 GMT) Full text and rfc822 format available.

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

From: Randy Taylor <dev <at> rjt.dev>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: [PATCH] Fix enums appearing as structs in c-ts-base-mode's imenu
Date: Wed, 08 Mar 2023 01:49:49 +0000
[Message part 1 (text/plain, inline)]
X-Debbugs-CC: casouri <at> gmail.com

With {c, c++}-ts-mode, enums appear as structs in imenu. The attached patch fixes this.

Example:
enum Thing { A, B, C };

Should appear as Enum Thing
[Message part 2 (text/html, inline)]
[0001-Fix-enums-appearing-as-structs-in-c-ts-base-mode-s-i.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#62043; Package emacs. (Wed, 08 Mar 2023 23:28:02 GMT) Full text and rfc822 format available.

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

From: Yuan Fu <casouri <at> gmail.com>
To: Randy Taylor <dev <at> rjt.dev>
Cc: 62043 <at> debbugs.gnu.org
Subject: Re: bug#62043: [PATCH] Fix enums appearing as structs in
 c-ts-base-mode's imenu
Date: Wed, 8 Mar 2023 15:27:18 -0800

> On Mar 7, 2023, at 5:49 PM, Randy Taylor <dev <at> rjt.dev> wrote:
> 
> X-Debbugs-CC: casouri <at> gmail.com
> 
> With {c, c++}-ts-mode, enums appear as structs in imenu. The attached patch fixes this.
> 
> Example:
> enum Thing { A, B, C };
> 
> Should appear as Enum Thing
> <0001-Fix-enums-appearing-as-structs-in-c-ts-base-mode-s-i.patch>

Thanks! I wonder what determines which categories to merge together and which to not? If we separate Enums, should we also separate Unions?

Yuan



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#62043; Package emacs. (Thu, 09 Mar 2023 02:05:01 GMT) Full text and rfc822 format available.

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

From: Randy Taylor <dev <at> rjt.dev>
To: Yuan Fu <casouri <at> gmail.com>
Cc: 62043 <at> debbugs.gnu.org
Subject: Re: bug#62043: [PATCH] Fix enums appearing as structs in
 c-ts-base-mode's imenu
Date: Thu, 09 Mar 2023 02:04:21 +0000
[Message part 1 (text/plain, inline)]
On Wednesday, March 8th, 2023 at 18:27, Yuan Fu <casouri <at> gmail.com> wrote:
> 
> > On Mar 7, 2023, at 5:49 PM, Randy Taylor dev <at> rjt.dev wrote:
> > 
> > X-Debbugs-CC: casouri <at> gmail.com
> > 
> > With {c, c++}-ts-mode, enums appear as structs in imenu. The attached patch fixes this.
> > 
> > Example:
> > enum Thing { A, B, C };
> > 
> > Should appear as Enum Thing
> > <0001-Fix-enums-appearing-as-structs-in-c-ts-base-mode-s-i.patch>
> 
> 
> Thanks! I wonder what determines which categories to merge together and which to not? If we separate Enums, should we also separate Unions?
> 
> Yuan

I think they should all be separate actually. Attached a patch that does so.
[0001-Fix-enums-and-unions-appearing-as-structs-in-c-ts-ba.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#62043; Package emacs. (Fri, 10 Mar 2023 06:01:02 GMT) Full text and rfc822 format available.

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

From: Yuan Fu <casouri <at> gmail.com>
To: Randy Taylor <dev <at> rjt.dev>
Cc: 62043 <at> debbugs.gnu.org
Subject: Re: bug#62043: [PATCH] Fix enums appearing as structs in
 c-ts-base-mode's imenu
Date: Thu, 9 Mar 2023 21:59:49 -0800

> On Mar 8, 2023, at 6:04 PM, Randy Taylor <dev <at> rjt.dev> wrote:
> 
> On Wednesday, March 8th, 2023 at 18:27, Yuan Fu <casouri <at> gmail.com> wrote:
>> 
>>> On Mar 7, 2023, at 5:49 PM, Randy Taylor dev <at> rjt.dev wrote:
>>> 
>>> X-Debbugs-CC: casouri <at> gmail.com
>>> 
>>> With {c, c++}-ts-mode, enums appear as structs in imenu. The attached patch fixes this.
>>> 
>>> Example:
>>> enum Thing { A, B, C };
>>> 
>>> Should appear as Enum Thing
>>> <0001-Fix-enums-appearing-as-structs-in-c-ts-base-mode-s-i.patch>
>> 
>> 
>> Thanks! I wonder what determines which categories to merge together and which to not? If we separate Enums, should we also separate Unions?
>> 
>> Yuan
> 
> I think they should all be separate actually. Attached a patch that does so.<0001-Fix-enums-and-unions-appearing-as-structs-in-c-ts-ba.patch>

That’s probably the right thing to do. I applied the patch, thanks!

Yuan





Reply sent to Randy Taylor <dev <at> rjt.dev>:
You have taken responsibility. (Fri, 10 Mar 2023 18:18:02 GMT) Full text and rfc822 format available.

Notification sent to Randy Taylor <dev <at> rjt.dev>:
bug acknowledged by developer. (Fri, 10 Mar 2023 18:18:02 GMT) Full text and rfc822 format available.

Message #19 received at 62043-done <at> debbugs.gnu.org (full text, mbox):

From: Randy Taylor <dev <at> rjt.dev>
To: Yuan Fu <casouri <at> gmail.com>
Cc: "62043-done <at> debbugs.gnu.org" <62043-done <at> debbugs.gnu.org>
Subject: Re: bug#62043: [PATCH] Fix enums appearing as structs in
 c-ts-base-mode's imenu
Date: Fri, 10 Mar 2023 18:16:48 +0000
On Friday, March 10th, 2023 at 00:59, Yuan Fu <casouri <at> gmail.com> wrote:
> 
> > On Mar 8, 2023, at 6:04 PM, Randy Taylor dev <at> rjt.dev wrote:
> > 
> > On Wednesday, March 8th, 2023 at 18:27, Yuan Fu casouri <at> gmail.com wrote:
> > 
> > > > On Mar 7, 2023, at 5:49 PM, Randy Taylor dev <at> rjt.dev wrote:
> > > > 
> > > > X-Debbugs-CC: casouri <at> gmail.com
> > > > 
> > > > With {c, c++}-ts-mode, enums appear as structs in imenu. The attached patch fixes this.
> > > > 
> > > > Example:
> > > > enum Thing { A, B, C };
> > > > 
> > > > Should appear as Enum Thing
> > > > <0001-Fix-enums-appearing-as-structs-in-c-ts-base-mode-s-i.patch>
> > > 
> > > Thanks! I wonder what determines which categories to merge together and which to not? If we separate Enums, should we also separate Unions?
> > > 
> > > Yuan
> > 
> > I think they should all be separate actually. Attached a patch that does so.<0001-Fix-enums-and-unions-appearing-as-structs-in-c-ts-ba.patch>
> 
> 
> That’s probably the right thing to do. I applied the patch, thanks!
> 
> Yuan

Thanks, closing.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 08 Apr 2023 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 17 days ago.

Previous Next


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