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.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Theodor Thornhill <theo <at> thornhill.no>
Subject: bug#58873: closed (Re: bug#58873: 29.0.50; Fix indent-line-function
 in tree-sitter)
Date: Sat, 12 Nov 2022 20:34:04 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#58873: 29.0.50; Fix indent-line-function in tree-sitter

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 58873 <at> debbugs.gnu.org.

-- 
58873: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=58873
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
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.

[Message part 3 (message/rfc822, inline)]
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 4 (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)]

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.