GNU bug report logs - #27000
25.2; js-jsx-mode incorrect indentation

Previous Next

Package: emacs;

Reported by: Renato Ferreira <renatofdds <at> gmail.com>

Date: Fri, 19 May 2017 22:46:02 UTC

Severity: normal

Found in version 25.2

Fixed in version 27.1

Done: Stefan Kangas <stefan <at> marxist.se>

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 27000 in the body.
You can then email your comments to 27000 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#27000; Package emacs. (Fri, 19 May 2017 22:46:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Renato Ferreira <renatofdds <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 19 May 2017 22:46:02 GMT) Full text and rfc822 format available.

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

From: Renato Ferreira <renatofdds <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.2; js-jsx-mode incorrect indentation
Date: Fri, 19 May 2017 19:45:28 -0300
Hello,

(I don't know if this bug has the same root cause from bug#24986, so my
apologies if it does.)

Using js-jsx-mode produces incorrect indentation on nested JSX elements
when there is an element inside a parentheses inside a JS expression:

function testA() {
	return (
		<div>
			<div> { ( <div/> ) } </div>
				</div>
	);
}

function testB() {
	return (
		<div>
			<div> { <div/> } </div>
		</div>
	);
}

testA indents correctly, but testB does not. This causes all sorts of
indentations problems after an incorrect indented line.

Thanks a lot in advance!




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27000; Package emacs. (Wed, 05 Jun 2019 03:10:02 GMT) Full text and rfc822 format available.

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

From: Jackson Ray Hamilton <jackson <at> jacksonrayhamilton.com>
To: 27000 <at> debbugs.gnu.org
Cc: renatofdds <at> gmail.com
Subject: Re: bug#27000: 25.2; js-jsx-mode incorrect indentation
Date: Tue, 4 Jun 2019 20:09:47 -0700
Hi Renato,

A set of changes I pushed to the Emacs master branch 2 months ago should 
resolve this issue.  (First fixed in 4b305bb185, but there were several 
commits after that when I broke/fixed it again.  The master branch is 
your best bet.)

Note that you might not need to use js-jsx-mode any more, either; 
support for JSX should be enabled in js-mode if you include the “React” 
library in a file, or if the file ends in “.jsx”.

Jackson





bug Marked as fixed in versions 27.1. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 05 Jun 2019 11:16:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 27000 <at> debbugs.gnu.org and Renato Ferreira <renatofdds <at> gmail.com> Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Wed, 21 Aug 2019 15:57: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. (Thu, 19 Sep 2019 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 218 days ago.

Previous Next


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