GNU bug report logs - #75785
30.0.93: grouped type declarations fail to indent in go-ts-mode

Previous Next

Package: emacs;

Reported by: Gerard Vermeulen <gerard.vermeulen <at> posteo.net>

Date: Thu, 23 Jan 2025 13:11:02 UTC

Severity: normal

Found in version 30.0.93

Done: Eli Zaretskii <eliz <at> gnu.org>

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 75785 in the body.
You can then email your comments to 75785 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 bug-gnu-emacs <at> gnu.org:
bug#75785; Package emacs. (Thu, 23 Jan 2025 13:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gerard Vermeulen <gerard.vermeulen <at> posteo.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 23 Jan 2025 13:11:02 GMT) Full text and rfc822 format available.

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

From: Gerard Vermeulen <gerard.vermeulen <at> posteo.net>
To: Bug gnu emacs <bug-gnu-emacs <at> gnu.org>
Subject: 30.0.93: grouped type declarations fail to indent in go-ts-mode
Date: Thu, 23 Jan 2025 13:09:45 +0000
Hi,

Automatic indenting when typing works in go-ts-mode for grouped
var declarations like:

var (
        a = 1
        b = 2
)

but not for type declarations (taken from
https://github.com/uber-go/guide/blob/master/style.md#group-similar-declarations
) like:

type (
Area float64
Volume float64
)

where I have to add the tabs (or spaces) myself.
I tried to change "type_spec" to "type_spec_list" in the defvar
go-ts-mode--indent-rules expression, but that did not fix it.

I am using a recent 30.0.93 git checkout.

Can it be fixed?

Best regards -- Gerard






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75785; Package emacs. (Thu, 23 Jan 2025 14:58:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gerard Vermeulen <gerard.vermeulen <at> posteo.net>,
 Randy Taylor <dev <at> rjt.dev>, Yuan Fu <casouri <at> gmail.com>
Cc: 75785 <at> debbugs.gnu.org
Subject: Re: bug#75785: 30.0.93: grouped type declarations fail to indent in
 go-ts-mode
Date: Thu, 23 Jan 2025 16:56:45 +0200
> Date: Thu, 23 Jan 2025 13:09:45 +0000
> From: Gerard Vermeulen <gerard.vermeulen <at> posteo.net>
> 
> Hi,
> 
> Automatic indenting when typing works in go-ts-mode for grouped
> var declarations like:
> 
> var (
>          a = 1
>          b = 2
> )
> 
> but not for type declarations (taken from
> https://github.com/uber-go/guide/blob/master/style.md#group-similar-declarations
> ) like:
> 
> type (
> Area float64
> Volume float64
> )
> 
> where I have to add the tabs (or spaces) myself.
> I tried to change "type_spec" to "type_spec_list" in the defvar
> go-ts-mode--indent-rules expression, but that did not fix it.
> 
> I am using a recent 30.0.93 git checkout.
> 
> Can it be fixed?

Randy and Yuan, could you please look into this?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75785; Package emacs. (Thu, 23 Jan 2025 16:23:02 GMT) Full text and rfc822 format available.

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

From: Randy Taylor <dev <at> rjt.dev>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Gerard Vermeulen <gerard.vermeulen <at> posteo.net>, Yuan Fu <casouri <at> gmail.com>,
 75785 <at> debbugs.gnu.org
Subject: Re: bug#75785: 30.0.93: grouped type declarations fail to indent in
 go-ts-mode
Date: Thu, 23 Jan 2025 16:22:37 +0000
[Message part 1 (text/plain, inline)]
On Thursday, January 23rd, 2025 at 09:56, Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
> 
> > Date: Thu, 23 Jan 2025 13:09:45 +0000
> 
> > From: Gerard Vermeulen gerard.vermeulen <at> posteo.net
> > 
> > Hi,
> > 
> > Automatic indenting when typing works in go-ts-mode for grouped
> > var declarations like:
> > 
> > var (
> > a = 1
> > b = 2
> > )
> > 
> > but not for type declarations (taken from
> > https://github.com/uber-go/guide/blob/master/style.md#group-similar-declarations
> > ) like:
> > 
> > type (
> > Area float64
> > Volume float64
> > )
> > 
> > where I have to add the tabs (or spaces) myself.
> > I tried to change "type_spec" to "type_spec_list" in the defvar
> > go-ts-mode--indent-rules expression, but that did not fix it.
> > 
> > I am using a recent 30.0.93 git checkout.
> > 
> > Can it be fixed?
> 
> 
> Randy and Yuan, could you please look into this?

Thanks for the report.

The attached patch fixes it for me.
[0001-Fix-go-ts-mode-type-declaration-indentation-Bug-7578.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75785; Package emacs. (Thu, 23 Jan 2025 16:43:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Randy Taylor <dev <at> rjt.dev>
Cc: gerard.vermeulen <at> posteo.net, casouri <at> gmail.com, 75785 <at> debbugs.gnu.org
Subject: Re: bug#75785: 30.0.93: grouped type declarations fail to indent in
 go-ts-mode
Date: Thu, 23 Jan 2025 18:42:05 +0200
> Date: Thu, 23 Jan 2025 16:22:37 +0000
> From: Randy Taylor <dev <at> rjt.dev>
> Cc: Gerard Vermeulen <gerard.vermeulen <at> posteo.net>, Yuan Fu <casouri <at> gmail.com>, 75785 <at> debbugs.gnu.org
> 
> On Thursday, January 23rd, 2025 at 09:56, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > 
> > 
> > > Date: Thu, 23 Jan 2025 13:09:45 +0000
> > 
> > > From: Gerard Vermeulen gerard.vermeulen <at> posteo.net
> > > 
> > > Hi,
> > > 
> > > Automatic indenting when typing works in go-ts-mode for grouped
> > > var declarations like:
> > > 
> > > var (
> > > a = 1
> > > b = 2
> > > )
> > > 
> > > but not for type declarations (taken from
> > > https://github.com/uber-go/guide/blob/master/style.md#group-similar-declarations
> > > ) like:
> > > 
> > > type (
> > > Area float64
> > > Volume float64
> > > )
> > > 
> > > where I have to add the tabs (or spaces) myself.
> > > I tried to change "type_spec" to "type_spec_list" in the defvar
> > > go-ts-mode--indent-rules expression, but that did not fix it.
> > > 
> > > I am using a recent 30.0.93 git checkout.
> > > 
> > > Can it be fixed?
> > 
> > 
> > Randy and Yuan, could you please look into this?
> 
> Thanks for the report.
> 
> The attached patch fixes it for me.

Thanks, installed on the emacs-30 release branch.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75785; Package emacs. (Thu, 23 Jan 2025 16:43:02 GMT) Full text and rfc822 format available.

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

From: Gerard Vermeulen <gerard.vermeulen <at> posteo.net>
To: Randy Taylor <dev <at> rjt.dev>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Yuan Fu <casouri <at> gmail.com>,
 75785 <at> debbugs.gnu.org
Subject: Re: bug#75785: 30.0.93: grouped type declarations fail to indent in
 go-ts-mode
Date: Thu, 23 Jan 2025 16:42:07 +0000

On 23.01.2025 17:22, Randy Taylor wrote:
> On Thursday, January 23rd, 2025 at 09:56, Eli Zaretskii <eliz <at> gnu.org> 
> wrote:
>> 
>> 
>> > Date: Thu, 23 Jan 2025 13:09:45 +0000
>> 
>> > From: Gerard Vermeulen gerard.vermeulen <at> posteo.net
>> >
>> > Hi,
>> >
>> > Automatic indenting when typing works in go-ts-mode for grouped
>> > var declarations like:
>> >
>> > var (
>> > a = 1
>> > b = 2
>> > )
>> >
>> > but not for type declarations (taken from
>> > https://github.com/uber-go/guide/blob/master/style.md#group-similar-declarations
>> > ) like:
>> >
>> > type (
>> > Area float64
>> > Volume float64
>> > )
>> >
>> > where I have to add the tabs (or spaces) myself.
>> > I tried to change "type_spec" to "type_spec_list" in the defvar
>> > go-ts-mode--indent-rules expression, but that did not fix it.
>> >
>> > I am using a recent 30.0.93 git checkout.
>> >
>> > Can it be fixed?
>> 
>> 
>> Randy and Yuan, could you please look into this?
> 
> Thanks for the report.
> 
> The attached patch fixes it for me.

For me too. Thanks.





Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Thu, 23 Jan 2025 17:36:02 GMT) Full text and rfc822 format available.

Notification sent to Gerard Vermeulen <gerard.vermeulen <at> posteo.net>:
bug acknowledged by developer. (Thu, 23 Jan 2025 17:36:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gerard Vermeulen <gerard.vermeulen <at> posteo.net>
Cc: dev <at> rjt.dev, casouri <at> gmail.com, 75785-done <at> debbugs.gnu.org
Subject: Re: bug#75785: 30.0.93: grouped type declarations fail to indent in
 go-ts-mode
Date: Thu, 23 Jan 2025 19:35:06 +0200
> Date: Thu, 23 Jan 2025 16:42:07 +0000
> From: Gerard Vermeulen <gerard.vermeulen <at> posteo.net>
> Cc: Eli Zaretskii <eliz <at> gnu.org>, Yuan Fu <casouri <at> gmail.com>,
>  75785 <at> debbugs.gnu.org
> 
> 
> 
> On 23.01.2025 17:22, Randy Taylor wrote:
> > On Thursday, January 23rd, 2025 at 09:56, Eli Zaretskii <eliz <at> gnu.org> 
> > wrote:
> >> 
> >> 
> >> > Date: Thu, 23 Jan 2025 13:09:45 +0000
> >> 
> >> > From: Gerard Vermeulen gerard.vermeulen <at> posteo.net
> >> >
> >> > Hi,
> >> >
> >> > Automatic indenting when typing works in go-ts-mode for grouped
> >> > var declarations like:
> >> >
> >> > var (
> >> > a = 1
> >> > b = 2
> >> > )
> >> >
> >> > but not for type declarations (taken from
> >> > https://github.com/uber-go/guide/blob/master/style.md#group-similar-declarations
> >> > ) like:
> >> >
> >> > type (
> >> > Area float64
> >> > Volume float64
> >> > )
> >> >
> >> > where I have to add the tabs (or spaces) myself.
> >> > I tried to change "type_spec" to "type_spec_list" in the defvar
> >> > go-ts-mode--indent-rules expression, but that did not fix it.
> >> >
> >> > I am using a recent 30.0.93 git checkout.
> >> >
> >> > Can it be fixed?
> >> 
> >> 
> >> Randy and Yuan, could you please look into this?
> > 
> > Thanks for the report.
> > 
> > The attached patch fixes it for me.
> 
> For me too. Thanks.

Thanks, so I'm now closing this bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 21 Feb 2025 12:24:18 GMT) Full text and rfc822 format available.

This bug report was last modified 115 days ago.

Previous Next


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