GNU bug report logs - #69088
[PATCH] Eagerly indent first field in tables in lua-ts-mode

Previous Next

Package: emacs;

Reported by: john muhl <jm <at> pub.pink>

Date: Tue, 13 Feb 2024 02:29:02 UTC

Severity: normal

Tags: patch

Merged with 69089

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 69088 in the body.
You can then email your comments to 69088 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#69088; Package emacs. (Tue, 13 Feb 2024 02:29:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to john muhl <jm <at> pub.pink>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 13 Feb 2024 02:29:02 GMT) Full text and rfc822 format available.

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

From: john muhl <jm <at> pub.pink>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Eagerly indent first field in tables in lua-ts-mode
Date: Mon, 12 Feb 2024 19:00:04 -0600
Tags: patch

lua-ts-mode supports aligning table fields to the first field so that
you can have code like:

  local t = { a = 1,
              b = 2, }

However if you prefer to put the first field on a newline like:

  local t = {
      a = 1,
      b = 2,
  }

the indentation doesn’t happen until you press RET after the first
comma. So you initially have something like (where | is point):

  local t = {
  |
  }

This patch fixes that so the initial indentation is correct from the beginning:

  local t = {
      |
  }




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69088; Package emacs. (Tue, 13 Feb 2024 02:55:01 GMT) Full text and rfc822 format available.

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

From: john muhl <jm <at> pub.pink>
To: 69088 <at> debbugs.gnu.org
Subject: Re: bug#69088: [PATCH] Eagerly indent first field in tables in
 lua-ts-mode
Date: Mon, 12 Feb 2024 20:49:05 -0600
[Message part 1 (text/plain, inline)]
Sorry for the duplicate. I thought there had been an error while
sending initially.

[0001-Eagerly-indent-first-field-in-tables-in-lua-ts-mode.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69088; Package emacs. (Tue, 13 Feb 2024 03:23:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: john muhl <jm <at> pub.pink>, 69088 <at> debbugs.gnu.org
Subject: Re: bug#69088: [PATCH] Eagerly indent first field in tables in
 lua-ts-mode
Date: Tue, 13 Feb 2024 05:21:34 +0200
On 13/02/2024 04:49, john muhl via Bug reports for GNU Emacs, the Swiss 
army knife of text editors wrote:
> +     ((and (lambda (node &rest _) (null node))
> +           (parent-is "table_constructor"))

That's probably the same as (match null "table_constructor")




Merged 69088 69089. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 13 Feb 2024 03:35:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69088; Package emacs. (Tue, 13 Feb 2024 03:47:01 GMT) Full text and rfc822 format available.

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

From: john muhl <jm <at> pub.pink>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: 69088 <at> debbugs.gnu.org
Subject: Re: bug#69088: [PATCH] Eagerly indent first field in tables in
 lua-ts-mode
Date: Mon, 12 Feb 2024 21:42:01 -0600
[Message part 1 (text/plain, inline)]
Dmitry Gutov <dmitry <at> gutov.dev> writes:

> On 13/02/2024 04:49, john muhl via Bug reports for GNU Emacs, the
> Swiss army knife of text editors wrote:
>> +     ((and (lambda (node &rest _) (null node))
>> +           (parent-is "table_constructor"))
>
> That's probably the same as (match null "table_constructor")

Yes it is. Thanks for the pointer.

[0001-Eagerly-indent-first-field-in-tables-in-lua-ts-mode.patch (text/x-patch, attachment)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 17 Feb 2024 08:59:01 GMT) Full text and rfc822 format available.

Notification sent to john muhl <jm <at> pub.pink>:
bug acknowledged by developer. (Sat, 17 Feb 2024 08:59:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: john muhl <jm <at> pub.pink>
Cc: dmitry <at> gutov.dev, 69088-done <at> debbugs.gnu.org
Subject: Re: bug#69088: [PATCH] Eagerly indent first field in tables in
 lua-ts-mode
Date: Sat, 17 Feb 2024 10:58:12 +0200
> Cc: 69088 <at> debbugs.gnu.org
> Date: Mon, 12 Feb 2024 21:42:01 -0600
> From:  john muhl via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> Dmitry Gutov <dmitry <at> gutov.dev> writes:
> 
> > On 13/02/2024 04:49, john muhl via Bug reports for GNU Emacs, the
> > Swiss army knife of text editors wrote:
> >> +     ((and (lambda (node &rest _) (null node))
> >> +           (parent-is "table_constructor"))
> >
> > That's probably the same as (match null "table_constructor")
> 
> Yes it is. Thanks for the pointer.

Thanks, installed on master, and closing the bug.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 17 Feb 2024 08:59:02 GMT) Full text and rfc822 format available.

Notification sent to john muhl <jm <at> pub.pink>:
bug acknowledged by developer. (Sat, 17 Feb 2024 08:59:02 GMT) Full text and rfc822 format available.

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

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

Previous Next


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