GNU bug report logs - #65134
[PATCH] * lisp/progmodes/js.el Fix js-ts-mode indent bug in JSX expressions

Previous Next

Package: emacs;

Reported by: Danny Freeman <danny <at> dfreeman.email>

Date: Mon, 7 Aug 2023 20:11:02 UTC

Severity: normal

Tags: patch

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 65134 in the body.
You can then email your comments to 65134 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#65134; Package emacs. (Mon, 07 Aug 2023 20:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Danny Freeman <danny <at> dfreeman.email>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 07 Aug 2023 20:11:02 GMT) Full text and rfc822 format available.

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

From: Danny Freeman <danny <at> dfreeman.email>
To: bug-gnu-emacs <at> gnu.org
Cc: v.pupillo <at> gmail.com
Subject: [PATCH] * lisp/progmodes/js.el Fix js-ts-mode indent bug in JSX
 expressions
Date: Mon, 07 Aug 2023 16:10:13 -0400
[Message part 1 (text/plain, inline)]
Tags: patch


Hello,

I have a patch for a bug I found in js-ts-mode.
When editing jsx blocks, the indentation does not work.

For example, in a file with the following file with JSX code in it
and js-ts-mode enabled

```
function App() {
  return (
    <div className="App">
    </div>
  );
}
```

placing your cursor at the end of the opening div tag and pressing ENTER
does not indent, instead there is no indentation.

This patch corrects that by properly expanding the
`js-jsx--treesit-indent-compatibility-bb1f97b' function, which returns
some indent rules.

[0001-lisp-progmodes-js.el-Fix-js-ts-mode-indent-bug-in-JS.patch (text/patch, attachment)]
[Message part 3 (text/plain, inline)]
Thank you,
-- 
Danny Freeman

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65134; Package emacs. (Tue, 08 Aug 2023 09:23:02 GMT) Full text and rfc822 format available.

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

From: Vincenzo Pupillo <v.pupillo <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org, Danny Freeman <danny <at> dfreeman.email>
Subject: Re: [PATCH] * lisp/progmodes/js.el Fix js-ts-mode indent bug in JSX
 expressions
Date: Tue, 08 Aug 2023 11:22:29 +0200
Hi, 
I confirm the bug and that the patch fixes it.
Thank you Danny.

Vincenzo Pupillo 

In data lunedì 7 agosto 2023 22:10:13 CEST, Danny Freeman ha scritto:
> Tags: patch
> 
> 
> Hello,
> 
> I have a patch for a bug I found in js-ts-mode.
> When editing jsx blocks, the indentation does not work.
> 
> For example, in a file with the following file with JSX code in it
> and js-ts-mode enabled
> 
> ```
> function App() {
>   return (
>     <div className="App">
>     </div>
>   );
> }
> ```
> 
> placing your cursor at the end of the opening div tag and pressing ENTER
> does not indent, instead there is no indentation.
> 
> This patch corrects that by properly expanding the
> `js-jsx--treesit-indent-compatibility-bb1f97b' function, which returns
> some indent rules.








Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Thu, 10 Aug 2023 09:04:02 GMT) Full text and rfc822 format available.

Notification sent to Danny Freeman <danny <at> dfreeman.email>:
bug acknowledged by developer. (Thu, 10 Aug 2023 09:04:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Vincenzo Pupillo <v.pupillo <at> gmail.com>
Cc: danny <at> dfreeman.email, 65134-done <at> debbugs.gnu.org
Subject: Re: bug#65134: [PATCH] * lisp/progmodes/js.el Fix js-ts-mode indent
 bug in JSX expressions
Date: Thu, 10 Aug 2023 12:03:16 +0300
> From: Vincenzo Pupillo <v.pupillo <at> gmail.com>
> Date: Tue, 08 Aug 2023 11:22:29 +0200
> 
> I confirm the bug and that the patch fixes it.
> Thank you Danny.

Thanks for the patch and the review.  I've now installed this on the
emacs-29 branch, and I'm therefore closing the bug.




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

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

Previous Next


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