GNU bug report logs - #58873
29.0.50; Fix indent-line-function in tree-sitter

Previous Next

Package: emacs;

Reported by: Theodor Thornhill <theo <at> thornhill.no>

Date: Sat, 29 Oct 2022 19:12:02 UTC

Severity: normal

Found in version 29.0.50

Done: Stefan Kangas <stefankangas <at> gmail.com>

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 58873 in the body.
You can then email your comments to 58873 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#58873; Package emacs. (Sat, 29 Oct 2022 19:12:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Theodor Thornhill <theo <at> thornhill.no>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 29 Oct 2022 19:12:02 GMT) Full text and rfc822 format available.

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

From: Theodor Thornhill <theo <at> thornhill.no>
To: bug-gnu-emacs <at> gnu.org
Cc: casouri <at> gmail.com
Subject: 29.0.50; Fix indent-line-function in tree-sitter
Date: Sat, 29 Oct 2022 21:11:27 +0200
[Message part 1 (text/plain, inline)]
Hi Yuan!

There were some regressions with the new indent-line-function - see
attached patch.  We need the point, not the indentation, and the
save-excursion is actually needed.

consider:

```
foo({
  thing: 1,
                tho|ng: 2, // <--- point is |
})
```

if you indent now you want to end up like this:

```
foo({
  thing: 1,
  tho|ng: 2, // <--- point is |
})
```

or if 

```
foo({
  thing: 1,
|thong: 2, // <--- point is |
})
```
You want to end up like this:

```
foo({
  thing: 1,
  |thong: 2, // <--- point is |
})
```

This patch addresses this :-)

In addition there was a bug where the parent-bol didn't indent
correctly, this should also be fixed now.

Thanks again, Yuan!

Theo

[0001-Fix-indent-line-function.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58873; Package emacs. (Sat, 29 Oct 2022 20:08:02 GMT) Full text and rfc822 format available.

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

From: Yuan Fu <casouri <at> gmail.com>
To: Theodor Thornhill <theo <at> thornhill.no>
Cc: 58873 <at> debbugs.gnu.org
Subject: Re: bug#58873: 29.0.50; Fix indent-line-function in tree-sitter
Date: Sat, 29 Oct 2022 13:06:55 -0700

> On Oct 29, 2022, at 12:11 PM, Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors <bug-gnu-emacs <at> gnu.org> wrote:
> 
> 
> Hi Yuan!
> 
> There were some regressions with the new indent-line-function - see
> attached patch.  We need the point, not the indentation, and the
> save-excursion is actually needed.
> 
> consider:
> 
> ```
> foo({
>  thing: 1,
>                tho|ng: 2, // <--- point is |
> })
> ```
> 
> if you indent now you want to end up like this:
> 
> ```
> foo({
>  thing: 1,
>  tho|ng: 2, // <--- point is |
> })
> ```
> 
> or if 
> 
> ```
> foo({
>  thing: 1,
> |thong: 2, // <--- point is |
> })
> ```
> You want to end up like this:
> 
> ```
> foo({
>  thing: 1,
>  |thong: 2, // <--- point is |
> })
> ```
> 
> This patch addresses this :-)
> 
> In addition there was a bug where the parent-bol didn't indent
> correctly, this should also be fixed now.
> 
> Thanks again, Yuan!

I applied your change (manually), thanks!

Yuan



Reply sent to Stefan Kangas <stefankangas <at> gmail.com>:
You have taken responsibility. (Sat, 12 Nov 2022 20:34:03 GMT) Full text and rfc822 format available.

Notification sent to Theodor Thornhill <theo <at> thornhill.no>:
bug acknowledged by developer. (Sat, 12 Nov 2022 20:34:03 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Yuan Fu <casouri <at> gmail.com>
Cc: 58873-done <at> debbugs.gnu.org, Theodor Thornhill <theo <at> thornhill.no>
Subject: Re: bug#58873: 29.0.50; Fix indent-line-function in tree-sitter
Date: Sat, 12 Nov 2022 12:33:41 -0800
Yuan Fu <casouri <at> gmail.com> writes:

> I applied your change (manually), thanks!

It seems this was installed but never closed so I'm doing that now.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58873; Package emacs. (Mon, 14 Nov 2022 09:17:02 GMT) Full text and rfc822 format available.

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

From: Yuan Fu <casouri <at> gmail.com>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 58873-done <at> debbugs.gnu.org, Theodor Thornhill <theo <at> thornhill.no>
Subject: Re: bug#58873: 29.0.50; Fix indent-line-function in tree-sitter
Date: Mon, 14 Nov 2022 01:16:18 -0800

> On Nov 12, 2022, at 12:33 PM, Stefan Kangas <stefankangas <at> gmail.com> wrote:
> 
> Yuan Fu <casouri <at> gmail.com> writes:
> 
>> I applied your change (manually), thanks!
> 
> It seems this was installed but never closed so I'm doing that now.

Thanks!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 12 Dec 2022 12:24:14 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 186 days ago.

Previous Next


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