From unknown Sat Jun 21 05:12:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32158: 26.1; Broken JSX indentation in case of arrow function passing to props Resent-From: Valentin Ignatev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Jul 2018 16:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 32158 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 32158@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.153158465917655 (code B ref -1); Sat, 14 Jul 2018 16:11:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 Jul 2018 16:10:59 +0000 Received: from localhost ([127.0.0.1]:60250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1feN8M-0004ag-QU for submit@debbugs.gnu.org; Sat, 14 Jul 2018 12:10:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37912) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1feMxI-0004Ha-7F for submit@debbugs.gnu.org; Sat, 14 Jul 2018 11:59:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1feMxB-0004au-Aa for submit@debbugs.gnu.org; Sat, 14 Jul 2018 11:59:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:59439) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1feMxB-0004ag-5i for submit@debbugs.gnu.org; Sat, 14 Jul 2018 11:59:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1feMx9-0007Sw-A0 for bug-gnu-emacs@gnu.org; Sat, 14 Jul 2018 11:59:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1feMx7-0004XO-NG for bug-gnu-emacs@gnu.org; Sat, 14 Jul 2018 11:59:23 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:43975) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1feMx7-0004WS-BJ for bug-gnu-emacs@gnu.org; Sat, 14 Jul 2018 11:59:21 -0400 Received: by mail-wr1-x42b.google.com with SMTP id b15-v6so27853772wrv.10 for ; Sat, 14 Jul 2018 08:59:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=8oj4jAIctQVGXjXLTfmuCyj6Qk/AfQwSzXxr0RtpNt0=; b=vOO/TkUxmnLf/Q3U7pE4a6GevYah62LxrxiZZrqP1FkE+mJJ7WAJjtNOAFUbFeHXCm XS5IWc74S16tXaa9pkBswp8UnvWIyZ/su2CYOzEKWu/TybrBEdMTPB4C01aNl45xlu/q d+vj9zt5CsPMQ9SwHQ8OO9edgeYupalbeTqEhMQWNxkcaySHHZNW6q+0CAtVXPAtKeTp 2ULtBEI5aWtHUZmRl0UYnRUwvOg/5XZR2WAICQSSwvBrItyim+dNglvEIZAvRhw55DZ6 +xWQTTxv+FmGNxZTxGWTsPl9StMqaPyaaCTVBIJ/oCMlGWyhRgFYpd8x1ZEWrYYG61kb 0dVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=8oj4jAIctQVGXjXLTfmuCyj6Qk/AfQwSzXxr0RtpNt0=; b=l03lXoc4cMKzSPeADrzGCT+6M6fx8LXnMWCwHzdyBn3LqXkoEJjTkAFNJJ/373Qi/F GOWTRbMQPdTvSf9EUTwCyFC6AvUnVGYZROVtMxugUeMt0K/AX7/Ily6OTP/dDLIBhwbt R906flYAZF2mrdRVdQDmI77sEkZpu8qJZTKcesJtfsC4EwedHRSism+8/nLi/xlnGRO8 uSAPQis7jyGNwrOogfC2uOeDNksJEYhI06kzWZscKAN6ljBMD0TWXK1OodRYln1j2bHE VzJmoe/49CBjUHy+xWWbjbepMRUZXFHvP8CG+bqpP+5pUo8UG4YslVbMqjOedTJO3fZI 1eMQ== X-Gm-Message-State: AOUpUlFUUPvNhUehs0VdJsSZFzyVCdwehqA4x+ViacGVWWNY3wm6518W zJV3SaSw6OzC6Wn4Zrq+vDumhgElgYN1qimC8Fc8qg== X-Google-Smtp-Source: AAOMgpcKodT88KBF1UB5l4/2jS0pws+9Cueg6rVMxpkTx/xpaWt9/jd0xok4o4CPER7gwtguw2neGfn3M+TYJ7yYUuQ= X-Received: by 2002:adf:820a:: with SMTP id 10-v6mr7615754wrb.144.1531583959797; Sat, 14 Jul 2018 08:59:19 -0700 (PDT) MIME-Version: 1.0 From: Valentin Ignatev Date: Sun, 15 Jul 2018 02:04:11 +1000 Message-ID: Content-Type: multipart/alternative; boundary="000000000000de12f20570f7ad0c" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Mailman-Approved-At: Sat, 14 Jul 2018 12:10:57 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --000000000000de12f20570f7ad0c Content-Type: text/plain; charset="UTF-8" Start with emacs -Q, create new jsx file, paste following content: const foo = (props) => (
i} />
); Then put cursor after closing input part (/>) and hit . Cursor will end rith below the "c" in "cat", but it expected to be below open bracket "<". If I remove "{i => i}", then indentation behavior works in an expected manner. In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-07-05 built on juergen Windowing system distributor 'The X.Org Foundation', version 11.0.12000000 Recent messages: previous-line: Beginning of buffer [2 times] Mark set C-M-g is undefined Mark set Mark deactivated Mark set C-M-g is undefined Quit Mark set Auto-saving...done Configured using: 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES THREADS LIBSYSTEMD LCMS2 Important settings: value of $LC_ALL: en_US.UTF-8 value of $LC_CTYPE: en_US.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: JSX Minor modes in effect: diff-auto-refine-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils apropos help-mode vc-git diff-mode easy-mmode js advice sgml-mode dom json map seq byte-opt gv bytecomp byte-compile cconv imenu thingatpt cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cl-loaddefs cl-lib elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 132251 10105) (symbols 48 24051 1) (miscs 40 109 176) (strings 32 40149 1453) (string-bytes 1 1170542) (vectors 16 19446) (vector-slots 8 548042 8566) (floats 8 56 381) (intervals 56 576 0) (buffers 992 14)) --000000000000de12f20570f7ad0c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Start with emacs -Q, create new jsx file, paste following = content:
const foo =3D (props) =3D> (
=C2=A0=C2=A0=C2=A0 <div&g= t;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <input
=C2=A0=C2=A0=C2=A0 cat=3D= {i =3D> i} />=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
=C2=A0=C2=A0=C2=A0 &l= t;/div>
);

Then put cursor after closing input part (/>) an= d hit <RET>. Cursor will
end rith below the "c" in "= ;cat", but it expected to be below open
bracket "<". I= f I remove "{i =3D> i}", then indentation behavior works inan expected manner.

In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu= , GTK+ Version 3.22.30)
=C2=A0of 2018-07-05 built on juergen
Windowin= g system distributor 'The X.Org Foundation', version 11.0.12000000<= br>Recent messages:
previous-line: Beginning of buffer [2 times]
Mark= set
C-M-g is undefined
Mark set
Mark deactivated
Mark set
C= -M-g is undefined
Quit
Mark set
Auto-saving...done

Configur= ed using:
=C2=A0'configure --prefix=3D/usr --sysconfdir=3D/etc --lib= execdir=3D/usr/lib
=C2=A0--localstatedir=3D/var --with-x-toolkit=3Dgtk3 = --with-xft --with-modules
=C2=A0'CFLAGS=3D-march=3Dx86-64 -mtune=3Dg= eneric -O2 -pipe -fstack-protector-strong
=C2=A0-fno-plt' CPPFLAGS= =3D-D_FORTIFY_SOURCE=3D2
=C2=A0LDFLAGS=3D-Wl,-O1,--sort-common,--as-need= ed,-z,relro,-z,now'

Configured features:
XPM JPEG TIFF GIF PN= G RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL GNUTLS LIBXML2 FR= EETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 MODULES THR= EADS LIBSYSTEMD LCMS2

Important settings:
=C2=A0 value of $LC_ALL= : en_US.UTF-8
=C2=A0 value of $LC_CTYPE: en_US.UTF-8
=C2=A0 value of = $LANG: en_US.UTF-8
=C2=A0 locale-coding-system: utf-8-unix

Major = mode: JSX

Minor modes in effect:
=C2=A0 diff-auto-refine-mode: t<= br>=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2=A0 electric= -indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 globa= l-font-lock-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-mode= : t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode: t=C2=A0 auto-compression-mode: t
=C2=A0 line-number-mode: t
=C2=A0 tr= ansient-mark-mode: t

Load-path shadows:
None found.

Featur= es:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddef= s
format-spec rfc822 mml mml-sec password-cache epa derived epg epg-conf= ig
gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-par= se
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
i= etf-drums mm-util mail-prsvr mail-utils apropos help-mode vc-git
diff-mo= de easy-mmode js advice sgml-mode dom json map seq byte-opt gv
bytecomp = byte-compile cconv imenu thingatpt cc-mode cc-fonts easymenu
cc-guess cc= -menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
cl-loaddefs = cl-lib elec-pair time-date mule-util tooltip eldoc electric
uniquify edi= ff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win= x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list repla= ce newcomment text-mode elisp-mode lisp-mode
prog-mode register page men= u-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lo= ck syntax facemenu font-core
term/tty-colors frame cl-generic cham georg= ian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean jap= anese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethio= pic indian cyrillic
chinese composite charscript charprop case-table epa= -hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded n= advice loaddefs
button faces cus-face macroexp files text-properties ove= rlay sha1 md5
base64 format env code-pages mule custom widget hashtable-= print-readable
backquote dbusbind inotify lcms2 dynamic-setting system-f= ont-setting
font-render-setting move-toolbar gtk x-toolkit x multi-ttymake-network-process emacs)

Memory information:
((conses 16 132= 251 10105)
=C2=A0(symbols 48 24051 1)
=C2=A0(miscs 40 109 176)
=C2= =A0(strings 32 40149 1453)
=C2=A0(string-bytes 1 1170542)
=C2=A0(vect= ors 16 19446)
=C2=A0(vector-slots 8 548042 8566)
=C2=A0(floats 8 56 3= 81)
=C2=A0(intervals 56 576 0)
=C2=A0(buffers 992 14))

--000000000000de12f20570f7ad0c-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 14 12:19:42 2018 Received: (at control) by debbugs.gnu.org; 14 Jul 2018 16:19:42 +0000 Received: from localhost ([127.0.0.1]:60256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1feNGn-0006n5-Te for submit@debbugs.gnu.org; Sat, 14 Jul 2018 12:19:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1feNGm-0006mu-NR for control@debbugs.gnu.org; Sat, 14 Jul 2018 12:19:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1feNGg-0001rB-KW for control@debbugs.gnu.org; Sat, 14 Jul 2018 12:19:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44509) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1feNGg-0001r7-Gg for control@debbugs.gnu.org; Sat, 14 Jul 2018 12:19:34 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1feNGg-0004TU-8A for control@debbugs.gnu.org; Sat, 14 Jul 2018 12:19:34 -0400 Subject: control message for bug 32158 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Sat, 14 Jul 2018 12:19:34 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) forcemerge 24896 32158 From unknown Sat Jun 21 05:12:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32158: 26.1; Broken JSX indentation in case of arrow function passing to props References: In-Reply-To: Resent-From: Jackson Ray Hamilton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Jun 2019 03:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32158 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 32158@debbugs.gnu.org Cc: valentignatev@gmail.com Received: via spool by 32158-submit@debbugs.gnu.org id=B32158.155970476232405 (code B ref 32158); Wed, 05 Jun 2019 03:20:01 +0000 Received: (at 32158) by debbugs.gnu.org; 5 Jun 2019 03:19:22 +0000 Received: from localhost ([127.0.0.1]:46227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYMSO-0008QZ-9E for submit@debbugs.gnu.org; Tue, 04 Jun 2019 23:19:22 -0400 Received: from mta-07-3.privateemail.com ([68.65.122.17]:19166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYMSL-0008QM-HM for 32158@debbugs.gnu.org; Tue, 04 Jun 2019 23:19:19 -0400 Received: from MTA-07.privateemail.com (localhost [127.0.0.1]) by MTA-07.privateemail.com (Postfix) with ESMTP id C064960059; Tue, 4 Jun 2019 23:19:10 -0400 (EDT) Received: from [192.168.88.227] (unknown [10.20.151.219]) by MTA-07.privateemail.com (Postfix) with ESMTPA id 8E86260058; Wed, 5 Jun 2019 03:19:10 +0000 (UTC) From: Jackson Ray Hamilton Message-ID: <2e0ccd59-e688-645c-eada-c4c85ff88b8a@jacksonrayhamilton.com> Date: Tue, 4 Jun 2019 20:19:10 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Valentin, A set of changes I pushed to the Emacs master branch 2 months ago should resolve this issue.  (First fixed in 1a1ef28518, but there were several commits after that when I broke/fixed it again.  The master branch is your best bet.) Jackson From unknown Sat Jun 21 05:12:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32158: 26.1; Broken JSX indentation in case of arrow function passing to props Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Jun 2019 10:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32158 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Jackson Ray Hamilton , 32158@debbugs.gnu.org Cc: valentignatev@gmail.com Received: via spool by 32158-submit@debbugs.gnu.org id=B32158.155973230011170 (code B ref 32158); Wed, 05 Jun 2019 10:59:01 +0000 Received: (at 32158) by debbugs.gnu.org; 5 Jun 2019 10:58:20 +0000 Received: from localhost ([127.0.0.1]:46594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYTca-0002u6-Ed for submit@debbugs.gnu.org; Wed, 05 Jun 2019 06:58:20 -0400 Received: from mail-wr1-f50.google.com ([209.85.221.50]:40408) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYTcY-0002tq-7Y for 32158@debbugs.gnu.org; Wed, 05 Jun 2019 06:58:18 -0400 Received: by mail-wr1-f50.google.com with SMTP id p11so14150822wre.7 for <32158@debbugs.gnu.org>; Wed, 05 Jun 2019 03:58:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=V1AFZY/xc6OQejFMcY+z49uRPfEUvfnEeW7lLLhDl0o=; b=j28oTwQXFSkhIuJzKgNI0duooUD8gm5/5W5BSd5Kd/EeQ3x1pi3C/XdAVnULaaSrPW 8rdOvQiuxPQlJZyZ136wq3/SCreoeJ5U8NGJyRboUm3rk7g0lFej/96lyE1qdPFbxPyd 9uXwOlZ3UPQWSDOC5rAsvPyU9LmmH6nKLKqn8KYPIKBDo/gxoJ/ND8xCNxWHcxjBB2xN Qh6B8qca+Knq3vN2rNC/Vzfkyqsu5adJSmR20TU5K+Iqqz2AFbkY16dx501Yx9PGD2+2 bolkszy2dbt4bD+IlbubKfJG96kF4ajpYd7/YC9F3Eo8OWWaBQmIriWkpfUCtJ3CEdmO Rt2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=V1AFZY/xc6OQejFMcY+z49uRPfEUvfnEeW7lLLhDl0o=; b=HmSDs23yJTFF4u3i7GVjQfooL05bblvHIwiuzeajnC1PHZpeS+qfR2ykiRz6+mT5C/ mOoGtFl4/MVTUfWyMwbb9pftz3sa6XFACQ6bPH6ZiRbhYTjqvCXuNxApIOongumRVHnI i1UrsBahsf+M1vnmozU8lKHZYfFxir8yvCDscY9pcciU6LhLgW2x5M5RogVt8cnGag5Z h/Q3MH7MB+3ouOEIpD8T7Kn/k+mLtMMt7FO+vkG8geNO4k/pvt7upioB8dJp8YFJ6PAy 5F6BFtOQCot41E/9Za5MlhU1b04KLuOBgoVgQKfAizZ10jE2A17Zf8DisMzYx9fXXhdt hH/w== X-Gm-Message-State: APjAAAWR6kJ3sWC/sG6/VbYqOZOskezn+lI7dek6T6RKfIFRM3Rgp8Lb svuQ2hInXPccB4smGYZ9LlM= X-Google-Smtp-Source: APXvYqzJruwB3BLorQUnITR7wXwHDhKhEK9EQj6LbRLkyRyGnBGDGwoCvhlER3VuwjymQNydf/xj7g== X-Received: by 2002:adf:9267:: with SMTP id 94mr2512655wrj.338.1559732292075; Wed, 05 Jun 2019 03:58:12 -0700 (PDT) Received: from [192.168.1.3] ([185.105.174.23]) by smtp.googlemail.com with ESMTPSA id x3sm11974493wrp.78.2019.06.05.03.58.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jun 2019 03:58:11 -0700 (PDT) References: <2e0ccd59-e688-645c-eada-c4c85ff88b8a@jacksonrayhamilton.com> From: Dmitry Gutov Message-ID: Date: Wed, 5 Jun 2019 13:58:09 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <2e0ccd59-e688-645c-eada-c4c85ff88b8a@jacksonrayhamilton.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 05.06.2019 6:19, Jackson Ray Hamilton wrote: > A set of changes I pushed to the Emacs master branch 2 months ago should > resolve this issue.  (First fixed in 1a1ef28518, but there were several > commits after that when I broke/fixed it again.  The master branch is > your best bet.) Jackson, here's a slight variation on this example that looks problematic: const foo = (props) => (
i} />
); (Note the empty line) That seems incorrect to me. From unknown Sat Jun 21 05:12:19 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Valentin Ignatev Subject: bug#32158: closed (Re: bug#32158: 26.1; Broken JSX indentation in case of arrow function passing to props) Message-ID: References: X-Gnu-PR-Message: they-closed 32158 X-Gnu-PR-Package: emacs Reply-To: 32158@debbugs.gnu.org Date: Wed, 05 Jun 2019 11:01:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1559732462-11503-1" This is a multi-part message in MIME format... ------------=_1559732462-11503-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #32158: 26.1; Broken JSX indentation in case of arrow function passing to p= rops 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 32158@debbugs.gnu.org. --=20 32158: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D32158 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1559732462-11503-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 32158-done) by debbugs.gnu.org; 5 Jun 2019 11:00:26 +0000 Received: from localhost ([127.0.0.1]:46598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYTeb-0002ye-S0 for submit@debbugs.gnu.org; Wed, 05 Jun 2019 07:00:26 -0400 Received: from mail-wr1-f50.google.com ([209.85.221.50]:36958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYTea-0002yP-90 for 32158-done@debbugs.gnu.org; Wed, 05 Jun 2019 07:00:24 -0400 Received: by mail-wr1-f50.google.com with SMTP id v14so1335845wrr.4 for <32158-done@debbugs.gnu.org>; Wed, 05 Jun 2019 04:00:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=HzRU94rtZOEVjc67keAFxBBOxVRuJR6thmo1BFHkxcg=; b=jzbQIcmD1tDpDL0szvOjF7jMaPHw7tZPwXA0XPiM6A3YTdyUXJk6ZwG7L09cNqPGF2 TKcwS9UBUJkbmJtCiI40+8Wb6jKho9m5YT/B4GnRv17FWHOVUtR3xMIrovIHIw5WYTS2 FbpJ8btFMXbJMWYFeuOk5wgMAyKi6h2Z5WEnmvyDo38t3zMF9Bt2Uiby2OeFXi4xTXe6 m3Ok9k15vXVHeeH4BpJZ04LJdN65l8zBgfLWQUydPRhdeZGyB6SxT5Lo5ZbCapXjVZe+ XyAsrlz0hkE9tD9RW2auK06tQe+iYWfaXAs0HN6FZsuR6fNts/umE6WVmkKvXoZps2Jj Fydg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:cc:references:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=HzRU94rtZOEVjc67keAFxBBOxVRuJR6thmo1BFHkxcg=; b=C5yg8aQLJvtdTPvbmbOsg4s2tglI/GnLZB4tbxR8g1tITyTqg3xnSJMGcgysBJnAsp raGnU6N41Nay7L/hhrjwiKk0gKuRjCVBgf10q39RSZKjfqI1FmBAw2a+UJJVo+9joudr FE3968lGNgm8RzPbU5sYmden5OV0M8Q8sMBYjDso9DxwLXfCZnXLgaaTsIE+EOLPx8St bRhUSJsMT5tudTP0bbdhn0a9RT36uEuxgwLYH5N6wdVAkHkRvx8paF7YKFfj/KjypXRL G1C7mx8zdDfFuy3q+intY4yjp3nBabFecG8R6Rokz3OUrAgU63cmtWpgcUeQ/vIfpMCU p1Kg== X-Gm-Message-State: APjAAAXBa6BnBmW+Aur82XaJqzmgXD+uR+FU4KUN3xvkkyDYbaFAtzye IfUI4JK53h9dC0OXp1kDajA= X-Google-Smtp-Source: APXvYqzgYe4ajgrhATDQ9F//iqjw7ldXeEGVujveh+CKh7xY4TgkUx2J3xD/OQyd/7OOX6j2wdO6dw== X-Received: by 2002:a5d:484e:: with SMTP id n14mr617671wrs.348.1559732418618; Wed, 05 Jun 2019 04:00:18 -0700 (PDT) Received: from [192.168.1.3] ([185.105.174.23]) by smtp.googlemail.com with ESMTPSA id v184sm7053466wme.10.2019.06.05.04.00.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jun 2019 04:00:18 -0700 (PDT) Subject: Re: bug#32158: 26.1; Broken JSX indentation in case of arrow function passing to props From: Dmitry Gutov To: Jackson Ray Hamilton , 32158-done@debbugs.gnu.org References: <2e0ccd59-e688-645c-eada-c4c85ff88b8a@jacksonrayhamilton.com> Message-ID: Date: Wed, 5 Jun 2019 14:00:16 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32158-done Cc: valentignatev@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 05.06.2019 13:58, Dmitry Gutov wrote: > Jackson, here's a slight variation on this example that looks problematic: > > const foo = (props) => ( >    
>       cat={i => i} /> > >  
> ); > > (Note the empty line) > > That seems incorrect to me. Sorry, never mind. I had to enable js-jsx-mode to test it properly. So, closing. Note that you can do it yourself by appending -done to a bug email. ------------=_1559732462-11503-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 14 Jul 2018 16:10:59 +0000 Received: from localhost ([127.0.0.1]:60250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1feN8M-0004ag-QU for submit@debbugs.gnu.org; Sat, 14 Jul 2018 12:10:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37912) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1feMxI-0004Ha-7F for submit@debbugs.gnu.org; Sat, 14 Jul 2018 11:59:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1feMxB-0004au-Aa for submit@debbugs.gnu.org; Sat, 14 Jul 2018 11:59:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:59439) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1feMxB-0004ag-5i for submit@debbugs.gnu.org; Sat, 14 Jul 2018 11:59:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1feMx9-0007Sw-A0 for bug-gnu-emacs@gnu.org; Sat, 14 Jul 2018 11:59:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1feMx7-0004XO-NG for bug-gnu-emacs@gnu.org; Sat, 14 Jul 2018 11:59:23 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:43975) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1feMx7-0004WS-BJ for bug-gnu-emacs@gnu.org; Sat, 14 Jul 2018 11:59:21 -0400 Received: by mail-wr1-x42b.google.com with SMTP id b15-v6so27853772wrv.10 for ; Sat, 14 Jul 2018 08:59:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=8oj4jAIctQVGXjXLTfmuCyj6Qk/AfQwSzXxr0RtpNt0=; b=vOO/TkUxmnLf/Q3U7pE4a6GevYah62LxrxiZZrqP1FkE+mJJ7WAJjtNOAFUbFeHXCm XS5IWc74S16tXaa9pkBswp8UnvWIyZ/su2CYOzEKWu/TybrBEdMTPB4C01aNl45xlu/q d+vj9zt5CsPMQ9SwHQ8OO9edgeYupalbeTqEhMQWNxkcaySHHZNW6q+0CAtVXPAtKeTp 2ULtBEI5aWtHUZmRl0UYnRUwvOg/5XZR2WAICQSSwvBrItyim+dNglvEIZAvRhw55DZ6 +xWQTTxv+FmGNxZTxGWTsPl9StMqaPyaaCTVBIJ/oCMlGWyhRgFYpd8x1ZEWrYYG61kb 0dVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=8oj4jAIctQVGXjXLTfmuCyj6Qk/AfQwSzXxr0RtpNt0=; b=l03lXoc4cMKzSPeADrzGCT+6M6fx8LXnMWCwHzdyBn3LqXkoEJjTkAFNJJ/373Qi/F GOWTRbMQPdTvSf9EUTwCyFC6AvUnVGYZROVtMxugUeMt0K/AX7/Ily6OTP/dDLIBhwbt R906flYAZF2mrdRVdQDmI77sEkZpu8qJZTKcesJtfsC4EwedHRSism+8/nLi/xlnGRO8 uSAPQis7jyGNwrOogfC2uOeDNksJEYhI06kzWZscKAN6ljBMD0TWXK1OodRYln1j2bHE VzJmoe/49CBjUHy+xWWbjbepMRUZXFHvP8CG+bqpP+5pUo8UG4YslVbMqjOedTJO3fZI 1eMQ== X-Gm-Message-State: AOUpUlFUUPvNhUehs0VdJsSZFzyVCdwehqA4x+ViacGVWWNY3wm6518W zJV3SaSw6OzC6Wn4Zrq+vDumhgElgYN1qimC8Fc8qg== X-Google-Smtp-Source: AAOMgpcKodT88KBF1UB5l4/2jS0pws+9Cueg6rVMxpkTx/xpaWt9/jd0xok4o4CPER7gwtguw2neGfn3M+TYJ7yYUuQ= X-Received: by 2002:adf:820a:: with SMTP id 10-v6mr7615754wrb.144.1531583959797; Sat, 14 Jul 2018 08:59:19 -0700 (PDT) MIME-Version: 1.0 From: Valentin Ignatev Date: Sun, 15 Jul 2018 02:04:11 +1000 Message-ID: Subject: 26.1; Broken JSX indentation in case of arrow function passing to props To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="000000000000de12f20570f7ad0c" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 14 Jul 2018 12:10:57 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --000000000000de12f20570f7ad0c Content-Type: text/plain; charset="UTF-8" Start with emacs -Q, create new jsx file, paste following content: const foo = (props) => (
i} />
); Then put cursor after closing input part (/>) and hit . Cursor will end rith below the "c" in "cat", but it expected to be below open bracket "<". If I remove "{i => i}", then indentation behavior works in an expected manner. In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-07-05 built on juergen Windowing system distributor 'The X.Org Foundation', version 11.0.12000000 Recent messages: previous-line: Beginning of buffer [2 times] Mark set C-M-g is undefined Mark set Mark deactivated Mark set C-M-g is undefined Quit Mark set Auto-saving...done Configured using: 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES THREADS LIBSYSTEMD LCMS2 Important settings: value of $LC_ALL: en_US.UTF-8 value of $LC_CTYPE: en_US.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: JSX Minor modes in effect: diff-auto-refine-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils apropos help-mode vc-git diff-mode easy-mmode js advice sgml-mode dom json map seq byte-opt gv bytecomp byte-compile cconv imenu thingatpt cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cl-loaddefs cl-lib elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 132251 10105) (symbols 48 24051 1) (miscs 40 109 176) (strings 32 40149 1453) (string-bytes 1 1170542) (vectors 16 19446) (vector-slots 8 548042 8566) (floats 8 56 381) (intervals 56 576 0) (buffers 992 14)) --000000000000de12f20570f7ad0c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Start with emacs -Q, create new jsx file, paste following = content:
const foo =3D (props) =3D> (
=C2=A0=C2=A0=C2=A0 <div&g= t;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <input
=C2=A0=C2=A0=C2=A0 cat=3D= {i =3D> i} />=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
=C2=A0=C2=A0=C2=A0 &l= t;/div>
);

Then put cursor after closing input part (/>) an= d hit <RET>. Cursor will
end rith below the "c" in "= ;cat", but it expected to be below open
bracket "<". I= f I remove "{i =3D> i}", then indentation behavior works inan expected manner.

In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu= , GTK+ Version 3.22.30)
=C2=A0of 2018-07-05 built on juergen
Windowin= g system distributor 'The X.Org Foundation', version 11.0.12000000<= br>Recent messages:
previous-line: Beginning of buffer [2 times]
Mark= set
C-M-g is undefined
Mark set
Mark deactivated
Mark set
C= -M-g is undefined
Quit
Mark set
Auto-saving...done

Configur= ed using:
=C2=A0'configure --prefix=3D/usr --sysconfdir=3D/etc --lib= execdir=3D/usr/lib
=C2=A0--localstatedir=3D/var --with-x-toolkit=3Dgtk3 = --with-xft --with-modules
=C2=A0'CFLAGS=3D-march=3Dx86-64 -mtune=3Dg= eneric -O2 -pipe -fstack-protector-strong
=C2=A0-fno-plt' CPPFLAGS= =3D-D_FORTIFY_SOURCE=3D2
=C2=A0LDFLAGS=3D-Wl,-O1,--sort-common,--as-need= ed,-z,relro,-z,now'

Configured features:
XPM JPEG TIFF GIF PN= G RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL GNUTLS LIBXML2 FR= EETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 MODULES THR= EADS LIBSYSTEMD LCMS2

Important settings:
=C2=A0 value of $LC_ALL= : en_US.UTF-8
=C2=A0 value of $LC_CTYPE: en_US.UTF-8
=C2=A0 value of = $LANG: en_US.UTF-8
=C2=A0 locale-coding-system: utf-8-unix

Major = mode: JSX

Minor modes in effect:
=C2=A0 diff-auto-refine-mode: t<= br>=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2=A0 electric= -indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 globa= l-font-lock-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-mode= : t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode: t=C2=A0 auto-compression-mode: t
=C2=A0 line-number-mode: t
=C2=A0 tr= ansient-mark-mode: t

Load-path shadows:
None found.

Featur= es:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddef= s
format-spec rfc822 mml mml-sec password-cache epa derived epg epg-conf= ig
gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-par= se
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
i= etf-drums mm-util mail-prsvr mail-utils apropos help-mode vc-git
diff-mo= de easy-mmode js advice sgml-mode dom json map seq byte-opt gv
bytecomp = byte-compile cconv imenu thingatpt cc-mode cc-fonts easymenu
cc-guess cc= -menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
cl-loaddefs = cl-lib elec-pair time-date mule-util tooltip eldoc electric
uniquify edi= ff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win= x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list repla= ce newcomment text-mode elisp-mode lisp-mode
prog-mode register page men= u-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lo= ck syntax facemenu font-core
term/tty-colors frame cl-generic cham georg= ian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean jap= anese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethio= pic indian cyrillic
chinese composite charscript charprop case-table epa= -hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded n= advice loaddefs
button faces cus-face macroexp files text-properties ove= rlay sha1 md5
base64 format env code-pages mule custom widget hashtable-= print-readable
backquote dbusbind inotify lcms2 dynamic-setting system-f= ont-setting
font-render-setting move-toolbar gtk x-toolkit x multi-ttymake-network-process emacs)

Memory information:
((conses 16 132= 251 10105)
=C2=A0(symbols 48 24051 1)
=C2=A0(miscs 40 109 176)
=C2= =A0(strings 32 40149 1453)
=C2=A0(string-bytes 1 1170542)
=C2=A0(vect= ors 16 19446)
=C2=A0(vector-slots 8 548042 8566)
=C2=A0(floats 8 56 3= 81)
=C2=A0(intervals 56 576 0)
=C2=A0(buffers 992 14))

--000000000000de12f20570f7ad0c-- ------------=_1559732462-11503-1-- From unknown Sat Jun 21 05:12:19 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Felipe Ochoa Subject: bug#24896: closed (Re: bug#32158: 26.1; Broken JSX indentation in case of arrow function passing to props) Message-ID: References: X-Gnu-PR-Message: they-closed 24896 X-Gnu-PR-Package: emacs Reply-To: 24896@debbugs.gnu.org Date: Wed, 05 Jun 2019 11:01:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1559732462-11503-3" This is a multi-part message in MIME format... ------------=_1559732462-11503-3 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #32158: JSX prop indentation after fat arrow 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 24896@debbugs.gnu.org. --=20 32158: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D32158 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1559732462-11503-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 32158-done) by debbugs.gnu.org; 5 Jun 2019 11:00:26 +0000 Received: from localhost ([127.0.0.1]:46598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYTeb-0002ye-S0 for submit@debbugs.gnu.org; Wed, 05 Jun 2019 07:00:26 -0400 Received: from mail-wr1-f50.google.com ([209.85.221.50]:36958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYTea-0002yP-90 for 32158-done@debbugs.gnu.org; Wed, 05 Jun 2019 07:00:24 -0400 Received: by mail-wr1-f50.google.com with SMTP id v14so1335845wrr.4 for <32158-done@debbugs.gnu.org>; Wed, 05 Jun 2019 04:00:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=HzRU94rtZOEVjc67keAFxBBOxVRuJR6thmo1BFHkxcg=; b=jzbQIcmD1tDpDL0szvOjF7jMaPHw7tZPwXA0XPiM6A3YTdyUXJk6ZwG7L09cNqPGF2 TKcwS9UBUJkbmJtCiI40+8Wb6jKho9m5YT/B4GnRv17FWHOVUtR3xMIrovIHIw5WYTS2 FbpJ8btFMXbJMWYFeuOk5wgMAyKi6h2Z5WEnmvyDo38t3zMF9Bt2Uiby2OeFXi4xTXe6 m3Ok9k15vXVHeeH4BpJZ04LJdN65l8zBgfLWQUydPRhdeZGyB6SxT5Lo5ZbCapXjVZe+ XyAsrlz0hkE9tD9RW2auK06tQe+iYWfaXAs0HN6FZsuR6fNts/umE6WVmkKvXoZps2Jj Fydg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:cc:references:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=HzRU94rtZOEVjc67keAFxBBOxVRuJR6thmo1BFHkxcg=; b=C5yg8aQLJvtdTPvbmbOsg4s2tglI/GnLZB4tbxR8g1tITyTqg3xnSJMGcgysBJnAsp raGnU6N41Nay7L/hhrjwiKk0gKuRjCVBgf10q39RSZKjfqI1FmBAw2a+UJJVo+9joudr FE3968lGNgm8RzPbU5sYmden5OV0M8Q8sMBYjDso9DxwLXfCZnXLgaaTsIE+EOLPx8St bRhUSJsMT5tudTP0bbdhn0a9RT36uEuxgwLYH5N6wdVAkHkRvx8paF7YKFfj/KjypXRL G1C7mx8zdDfFuy3q+intY4yjp3nBabFecG8R6Rokz3OUrAgU63cmtWpgcUeQ/vIfpMCU p1Kg== X-Gm-Message-State: APjAAAXBa6BnBmW+Aur82XaJqzmgXD+uR+FU4KUN3xvkkyDYbaFAtzye IfUI4JK53h9dC0OXp1kDajA= X-Google-Smtp-Source: APXvYqzgYe4ajgrhATDQ9F//iqjw7ldXeEGVujveh+CKh7xY4TgkUx2J3xD/OQyd/7OOX6j2wdO6dw== X-Received: by 2002:a5d:484e:: with SMTP id n14mr617671wrs.348.1559732418618; Wed, 05 Jun 2019 04:00:18 -0700 (PDT) Received: from [192.168.1.3] ([185.105.174.23]) by smtp.googlemail.com with ESMTPSA id v184sm7053466wme.10.2019.06.05.04.00.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jun 2019 04:00:18 -0700 (PDT) Subject: Re: bug#32158: 26.1; Broken JSX indentation in case of arrow function passing to props From: Dmitry Gutov To: Jackson Ray Hamilton , 32158-done@debbugs.gnu.org References: <2e0ccd59-e688-645c-eada-c4c85ff88b8a@jacksonrayhamilton.com> Message-ID: Date: Wed, 5 Jun 2019 14:00:16 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32158-done Cc: valentignatev@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 05.06.2019 13:58, Dmitry Gutov wrote: > Jackson, here's a slight variation on this example that looks problematic: > > const foo = (props) => ( >    
>       cat={i => i} /> > >  
> ); > > (Note the empty line) > > That seems incorrect to me. Sorry, never mind. I had to enable js-jsx-mode to test it properly. So, closing. Note that you can do it yourself by appending -done to a bug email. ------------=_1559732462-11503-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 7 Nov 2016 16:34:31 +0000 Received: from localhost ([127.0.0.1]:48582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c3msQ-0007Lb-ME for submit@debbugs.gnu.org; Mon, 07 Nov 2016 11:34:30 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c3gfJ-0002Ve-3q for submit@debbugs.gnu.org; Mon, 07 Nov 2016 04:56:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c3gfC-0000NL-KQ for submit@debbugs.gnu.org; Mon, 07 Nov 2016 04:56:27 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:33381) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c3gfC-0000NH-HZ for submit@debbugs.gnu.org; Mon, 07 Nov 2016 04:56:26 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51003) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3gfB-0001II-4x for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2016 04:56:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c3gfA-0000Me-2B for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2016 04:56:25 -0500 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]:38616) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c3gf9-0000MO-Pz for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2016 04:56:23 -0500 Received: by mail-wm0-x235.google.com with SMTP id f82so107191650wmf.1 for ; Mon, 07 Nov 2016 01:56:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=VJmS/V1XIZDsh/rB37q8xNSwF79geYioHeOeS7gi8e4=; b=Fh8AG5UvMBGDId7JkcXw8EOs5xNgT9jcwXIWGoSxFP29rCv0q4+YniwjzRxohEw5YZ J0Khc0TVSwBAALIyjUG2xjzqwDoefzKREauQp9RyNQjwTyIxsbAr0uNBwTxwMcOPVJ1H Fn9WJN9UiEwY+LynH/kfZ3zC7qq/uYVMT8pq8zYHI1OI8xeG8sNRrGRPwvmk7UaFd2I+ ia+iY4wswIoDGh3PBV+wgW9G6T5E4tHrUR6PdnORfbS1wCjy4fWjIsN7NEy8XTVSrfCS Ab6dUc+iM28zL03pcFEqCUnS1KQK+n9awJ3KG4AtJGxhUkRc/NG4ee1AHQmvxE6hgcmo Oc7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=VJmS/V1XIZDsh/rB37q8xNSwF79geYioHeOeS7gi8e4=; b=exA1epqMbnHWlblebABBm79a9/qNRbYLX0MtxY8/FhPcIjg/CbD0gX01D4iqilu1p0 Q/XizWDS2zsIXfmc58OfbsQKOV32X/yE/TSFagVRI5oXsmInXBA55m1T2O+x8HY69N+9 F1SFvTuf5HOX8cIyQS5d5fEHb9uTtuh7cldekZsR0/2rAQ/aSh03m9yUQlob8jCwKzsl 3noE3O4x8U43qOTzScPD8nIpx90xlNKjGTmnmrKZEPvefAGLkA7i/Cg8HafNj9zimlFh esx7a84iazft0mUNmIRrUTLc2T1rkWeSGbxjxJC3f5BpWqoD/AArJxrDUjhN/fbxWftk Dfdw== X-Gm-Message-State: ABUngvfoL2K2ujyzEtLz6XDK2S93/xlpwIt+Dqo0epW7AnMIS91nP7T0TMvpqSgHxgUHhPXFjCZny4mQ6tERDA== X-Received: by 10.194.203.5 with SMTP id km5mr5638517wjc.230.1478512581816; Mon, 07 Nov 2016 01:56:21 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.185.5 with HTTP; Mon, 7 Nov 2016 01:56:21 -0800 (PST) From: Felipe Ochoa Date: Mon, 7 Nov 2016 10:56:21 +0100 Message-ID: Subject: JSX prop indentation after fat arrow To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=047d7bae45323c37730540b30929 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 07 Nov 2016 11:34:29 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --047d7bae45323c37730540b30929 Content-Type: text/plain; charset=UTF-8 (Preemptive apologies if this is the wrong list/format for this comment -- first time filer here!) When indenting JSX code using js2- or js-mode, the indentation function gets confused when there's a fat arrow function in a JSX prop. Compare the way the following two code blocks are auto-indented: const Component = props => ( // Incorrect indentation c} b={123}> ); const Component = props => ( // Correct indentation ); I've tracked the problem down to `sgml-calculate-indent' using `parse-partial-sexp' with `sgml-tag-syntax-table', where `>' is treated as a close-parenthesis character (and thus the end-of-tag marker). I don't think there's a way to patch the syntax table that would let `>' flip between punctuation and close-parens based on context, but one possible fix when using js2-mode (not sure about js-mode) is to apply a "." 'syntax-table text property to the `>' when parsing a fat arrow. Unfortunately, `js-jsx-indent-line' calls `sgml-indent-line' using `js--as-sgml', which sets `parse-sexp-lookup-properties' to nil. Would there be any harm in setting `parse-sexp-lookup-properties' to t instead? As far as I can tell, js-mode and js2-mode only use 'syntax-table propeties for regex literals. As a side-note, there may well be a different solution to this problem; I still don't understand why the following block is indented correctly: const Component = props => ( /} b={123}> ); --047d7bae45323c37730540b30929 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
(Pree= mptive apologies if this is the wrong list/format for this comment -- first= time filer here!)

When indenting JSX code using js2- or js-mode, the indentation function gets confus= ed when there's a fat arrow function in a JSX prop. Compare the way the following two code blocks are=20 auto-indented:

const Co= mponent =3D props =3D> ( // Incorrect indentation
=C2=A0=C2=A0=C2=A0 = <FatArrow a=3D{e =3D> c}
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 b=3D{123}&= gt;
=C2=A0=C2=A0=C2=A0 </FatArrow>
);

const Component =3D props =3D> ( // Correct indentation
=C2= =A0=C2=A0=C2=A0 <NoFatArrow a=3D{123}
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 b=3D{123}>
=C2=A0=C2=A0=C2= =A0 </NoFatArrow>
);

I've tracked the problem down to `= sgml-calculate-indent' using `parse-partial-sexp' with=20 `sgml-tag-syntax-table', where `>' is treated as a close-parenth= esis=20 character (and thus the end-of-tag marker). I don't think there's a= way to patch the syntax table that=20 would let `>' flip between punctuation and close-parens based on=20 context, but one possible fix when using js2-mode (not sure about js-mode) = is to apply a "." 'syntax-table text property to the `>= 9; when parsing a fat arrow.

Unfortunately, `js-jsx-indent-line'= calls `sgml-indent-line' using `js--as-sgml', which sets `parse-se= xp-lookup-properties' to nil.

Would there be any harm in
= setting `parse-sexp-lookup-= properties' to t instead? As far as I can tell, js-mode and js2-mode on= ly use 'syntax-table propeties for regex literals.


As a side-note, th= ere may well be a different solution to this problem; I still don't und= erstand why the following block is indented correctly:

const Compone= nt =3D props =3D> (
=C2=A0=C2=A0=C2=A0 <WithRegex a=3D{/>/}
= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 b=3D{123}>
=C2=A0=C2=A0=C2=A0 </WithRegex>
);
<= /span>
--047d7bae45323c37730540b30929-- ------------=_1559732462-11503-3-- From unknown Sat Jun 21 05:12:19 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: =?UTF-8?Q?Dra=C5=BEen?= Subject: bug#26001: closed (Re: bug#32158: 26.1; Broken JSX indentation in case of arrow function passing to props) Message-ID: References: X-Gnu-PR-Message: they-closed 26001 X-Gnu-PR-Package: emacs Reply-To: 26001@debbugs.gnu.org Date: Wed, 05 Jun 2019 11:01:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1559732463-11503-5" This is a multi-part message in MIME format... ------------=_1559732463-11503-5 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #32158: js-mode: JSX indentation after fat-arrow attribute 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 26001@debbugs.gnu.org. --=20 32158: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D32158 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1559732463-11503-5 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 32158-done) by debbugs.gnu.org; 5 Jun 2019 11:00:26 +0000 Received: from localhost ([127.0.0.1]:46598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYTeb-0002ye-S0 for submit@debbugs.gnu.org; Wed, 05 Jun 2019 07:00:26 -0400 Received: from mail-wr1-f50.google.com ([209.85.221.50]:36958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYTea-0002yP-90 for 32158-done@debbugs.gnu.org; Wed, 05 Jun 2019 07:00:24 -0400 Received: by mail-wr1-f50.google.com with SMTP id v14so1335845wrr.4 for <32158-done@debbugs.gnu.org>; Wed, 05 Jun 2019 04:00:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=HzRU94rtZOEVjc67keAFxBBOxVRuJR6thmo1BFHkxcg=; b=jzbQIcmD1tDpDL0szvOjF7jMaPHw7tZPwXA0XPiM6A3YTdyUXJk6ZwG7L09cNqPGF2 TKcwS9UBUJkbmJtCiI40+8Wb6jKho9m5YT/B4GnRv17FWHOVUtR3xMIrovIHIw5WYTS2 FbpJ8btFMXbJMWYFeuOk5wgMAyKi6h2Z5WEnmvyDo38t3zMF9Bt2Uiby2OeFXi4xTXe6 m3Ok9k15vXVHeeH4BpJZ04LJdN65l8zBgfLWQUydPRhdeZGyB6SxT5Lo5ZbCapXjVZe+ XyAsrlz0hkE9tD9RW2auK06tQe+iYWfaXAs0HN6FZsuR6fNts/umE6WVmkKvXoZps2Jj Fydg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:cc:references:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=HzRU94rtZOEVjc67keAFxBBOxVRuJR6thmo1BFHkxcg=; b=C5yg8aQLJvtdTPvbmbOsg4s2tglI/GnLZB4tbxR8g1tITyTqg3xnSJMGcgysBJnAsp raGnU6N41Nay7L/hhrjwiKk0gKuRjCVBgf10q39RSZKjfqI1FmBAw2a+UJJVo+9joudr FE3968lGNgm8RzPbU5sYmden5OV0M8Q8sMBYjDso9DxwLXfCZnXLgaaTsIE+EOLPx8St bRhUSJsMT5tudTP0bbdhn0a9RT36uEuxgwLYH5N6wdVAkHkRvx8paF7YKFfj/KjypXRL G1C7mx8zdDfFuy3q+intY4yjp3nBabFecG8R6Rokz3OUrAgU63cmtWpgcUeQ/vIfpMCU p1Kg== X-Gm-Message-State: APjAAAXBa6BnBmW+Aur82XaJqzmgXD+uR+FU4KUN3xvkkyDYbaFAtzye IfUI4JK53h9dC0OXp1kDajA= X-Google-Smtp-Source: APXvYqzgYe4ajgrhATDQ9F//iqjw7ldXeEGVujveh+CKh7xY4TgkUx2J3xD/OQyd/7OOX6j2wdO6dw== X-Received: by 2002:a5d:484e:: with SMTP id n14mr617671wrs.348.1559732418618; Wed, 05 Jun 2019 04:00:18 -0700 (PDT) Received: from [192.168.1.3] ([185.105.174.23]) by smtp.googlemail.com with ESMTPSA id v184sm7053466wme.10.2019.06.05.04.00.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jun 2019 04:00:18 -0700 (PDT) Subject: Re: bug#32158: 26.1; Broken JSX indentation in case of arrow function passing to props From: Dmitry Gutov To: Jackson Ray Hamilton , 32158-done@debbugs.gnu.org References: <2e0ccd59-e688-645c-eada-c4c85ff88b8a@jacksonrayhamilton.com> Message-ID: Date: Wed, 5 Jun 2019 14:00:16 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32158-done Cc: valentignatev@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 05.06.2019 13:58, Dmitry Gutov wrote: > Jackson, here's a slight variation on this example that looks problematic: > > const foo = (props) => ( >    
>       cat={i => i} /> > >  
> ); > > (Note the empty line) > > That seems incorrect to me. Sorry, never mind. I had to enable js-jsx-mode to test it properly. So, closing. Note that you can do it yourself by appending -done to a bug email. ------------=_1559732463-11503-5 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 6 Mar 2017 16:19:01 +0000 Received: from localhost ([127.0.0.1]:42972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ckvLg-0007fO-Ln for submit@debbugs.gnu.org; Mon, 06 Mar 2017 11:19:01 -0500 Received: from eggs.gnu.org ([208.118.235.92]:57521) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cktpB-00052c-12 for submit@debbugs.gnu.org; Mon, 06 Mar 2017 09:41:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cktp4-00054f-7c for submit@debbugs.gnu.org; Mon, 06 Mar 2017 09:41:15 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:58268) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cktp4-00054G-2C for submit@debbugs.gnu.org; Mon, 06 Mar 2017 09:41:14 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cktp2-0004Nj-EF for bug-gnu-emacs@gnu.org; Mon, 06 Mar 2017 09:41:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cktp0-00051Z-RA for bug-gnu-emacs@gnu.org; Mon, 06 Mar 2017 09:41:12 -0500 Received: from mail-io0-x22f.google.com ([2607:f8b0:4001:c06::22f]:33144) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cktp0-00050P-KC for bug-gnu-emacs@gnu.org; Mon, 06 Mar 2017 09:41:10 -0500 Received: by mail-io0-x22f.google.com with SMTP id f84so113105300ioj.0 for ; Mon, 06 Mar 2017 06:41:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=eiLNHs08Ot7jw9IrI90LyzDEEHjOznOK46xHWZ/7Lq4=; b=UEsmT0v8puaYgbAJKq+G89ji3D1gsEDya7m+V1iMrRhrhU4whOny4/abEYR24Vgmkq /EWviS0IypT5UXyKkKek82iU3NxF4J8qKMEJoRk8wiHbeUeP6LjMB6VMtRY6PFN2fAMZ 63HYfhx4Jq+dk7ArFobu0WDvYXz5XVQYKyXHizT6PexFenWd98ebIgmiSEc4eGa2SkrP MI+1dSde9LS36F0CdLl2yn8rUj7IqysR5sIO46oqpmFtVZvLwzCZK2zep+oSaJavB9kf LwWkyYE2Buz81l3RD6fzIjoPcrpzJ56OlcxnxW+SfsgBxA5jLs92VQHzQpqKdsdsvQjG fULA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=eiLNHs08Ot7jw9IrI90LyzDEEHjOznOK46xHWZ/7Lq4=; b=tuiNoJa8Zb7dLAGdNtCwTWseo1LRx54opDyJYxY4XKWqdQzdKbsK5vsEV9uqtrbfPZ /CkapGcf5dYOJAfJ0iUpzrlRmMPtgyn+OTNaLNJLAN/V3FzrLwzDfIBd+oIYnej0L5G8 iOfN0H7rgGU3xobMQzB0HmdGcMELI5CP7QhQHhyW9mLhrYAKjqMNeWIEyiq5k5PhzcGB oIcWdkc0PPaCNqSYO83z4KtqjhHfL/g/aKn2Y1VGOmTj3oMWk08eip4hfR7MAGaoftvL msPEmEcKYisiEctzr3yTxLucOnAY0Hh197ZpsfeibRKdkLjFu01q+X5+e43yJeh5Vr0J uJXg== X-Gm-Message-State: AMke39mnoWDKTIiYawdh1Ww7jOdJ2Q8eDDsXKtHZxKa5NfNXS2QQ5sQkANkE9m5ntKsm/HVMEaHcdcR7RmH++A== X-Received: by 10.107.187.133 with SMTP id l127mr14377788iof.1.1488811267899; Mon, 06 Mar 2017 06:41:07 -0800 (PST) MIME-Version: 1.0 From: =?UTF-8?Q?Dra=C5=BEen?= Date: Mon, 06 Mar 2017 14:40:56 +0000 Message-ID: Subject: js-mode: JSX indentation after fat-arrow attribute To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=94eb2c0763c8c2c958054a10e2be X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 06 Mar 2017 11:18:59 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.8 (---) --94eb2c0763c8c2c958054a10e2be Content-Type: text/plain; charset=UTF-8 As mentioned in https://github.com/mooz/js2-mode/issues/389#issuecomment-271869380 , there seems to be a bug in the way js-mode (at least the folks there pointed me at js-mode) indents JSX JavaScript. When I'm doing a map with JSX syntax I'm getting: render() { const messages = this.state.messages.map( message => ); return messages; } I'd ideally expect something like: render() { const messages = this.state.messages.map( message => ); return messages; } It's even odder when I try to leave the argument to the arrow function in the line above: render() { const messages = this.state.messages.map(message => ); return messages; } For this second case, I'd hope to get: render() { const messages = this.state.messages.map(message => ); return messages; } (I get such results if I wrap the return expression in parentheses) --94eb2c0763c8c2c958054a10e2be Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

As mentioned in=C2=A0https://github.com/mooz/js2-mode/issues= /389#issuecomment-271869380=C2=A0, there seems to be a bug in the way j= s-mode (at least the folks there pointed me at js-mode) indents JSX JavaScr= ipt.

Whe= n I'm doing a=C2=A0map=C2= =A0with JSX syntax I'm getting:

render=
() {
    const messages =3D this.state.messages.map=
(
        message =3D> <Message key=3D=
{=
message.id}
        text=3D{message.text}
        mine=3D{message.mine} />
    );
    return messages;
}

I'd ideall= y expect something like:

render() { const messages =3D this.state.messages.map= ( message =3D> <Message key=3D= {= message.id} text=3D{message.text} mine=3D{message.mine} /> ); return messages; }

It's even = odder when I try to leave the argument to the arrow function in the line ab= ove:

render() {
    const messages =3D this.state.messages.map=
(message =3D>
                                             <Message key=3D{messag=
e.timestamp}
                                             text=3D{message.text}
                                             mine=3D{message.mine} />
                                            );
    return messages;
}

For this secon= d case, I'd hope to get:

render() { const messages =3D this.state.messages.map= (message =3D> <Message key<= /span>=3D{message.timestamp} text=3D{message.text} mine=3D{message.mine} /> ); return messages; }

(I get such res= ults if I wrap the return expression in parentheses)

--94eb2c0763c8c2c958054a10e2be-- ------------=_1559732463-11503-5-- From unknown Sat Jun 21 05:12:19 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Mitchel Humpherys Subject: bug#30225: closed (Re: bug#32158: 26.1; Broken JSX indentation in case of arrow function passing to props) Message-ID: References: <87shaxe546.fsf@grinchel.i-did-not-set--mail-host-address--so-tickle-me> X-Gnu-PR-Message: they-closed 30225 X-Gnu-PR-Package: emacs Reply-To: 30225@debbugs.gnu.org Date: Wed, 05 Jun 2019 11:01:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1559732463-11503-7" This is a multi-part message in MIME format... ------------=_1559732463-11503-7 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #32158: 27.0.50; jsx: Arrow function in attribute breaks indentation 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 30225@debbugs.gnu.org. --=20 32158: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D32158 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1559732463-11503-7 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 32158-done) by debbugs.gnu.org; 5 Jun 2019 11:00:26 +0000 Received: from localhost ([127.0.0.1]:46598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYTeb-0002ye-S0 for submit@debbugs.gnu.org; Wed, 05 Jun 2019 07:00:26 -0400 Received: from mail-wr1-f50.google.com ([209.85.221.50]:36958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYTea-0002yP-90 for 32158-done@debbugs.gnu.org; Wed, 05 Jun 2019 07:00:24 -0400 Received: by mail-wr1-f50.google.com with SMTP id v14so1335845wrr.4 for <32158-done@debbugs.gnu.org>; Wed, 05 Jun 2019 04:00:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=HzRU94rtZOEVjc67keAFxBBOxVRuJR6thmo1BFHkxcg=; b=jzbQIcmD1tDpDL0szvOjF7jMaPHw7tZPwXA0XPiM6A3YTdyUXJk6ZwG7L09cNqPGF2 TKcwS9UBUJkbmJtCiI40+8Wb6jKho9m5YT/B4GnRv17FWHOVUtR3xMIrovIHIw5WYTS2 FbpJ8btFMXbJMWYFeuOk5wgMAyKi6h2Z5WEnmvyDo38t3zMF9Bt2Uiby2OeFXi4xTXe6 m3Ok9k15vXVHeeH4BpJZ04LJdN65l8zBgfLWQUydPRhdeZGyB6SxT5Lo5ZbCapXjVZe+ XyAsrlz0hkE9tD9RW2auK06tQe+iYWfaXAs0HN6FZsuR6fNts/umE6WVmkKvXoZps2Jj Fydg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:cc:references:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=HzRU94rtZOEVjc67keAFxBBOxVRuJR6thmo1BFHkxcg=; b=C5yg8aQLJvtdTPvbmbOsg4s2tglI/GnLZB4tbxR8g1tITyTqg3xnSJMGcgysBJnAsp raGnU6N41Nay7L/hhrjwiKk0gKuRjCVBgf10q39RSZKjfqI1FmBAw2a+UJJVo+9joudr FE3968lGNgm8RzPbU5sYmden5OV0M8Q8sMBYjDso9DxwLXfCZnXLgaaTsIE+EOLPx8St bRhUSJsMT5tudTP0bbdhn0a9RT36uEuxgwLYH5N6wdVAkHkRvx8paF7YKFfj/KjypXRL G1C7mx8zdDfFuy3q+intY4yjp3nBabFecG8R6Rokz3OUrAgU63cmtWpgcUeQ/vIfpMCU p1Kg== X-Gm-Message-State: APjAAAXBa6BnBmW+Aur82XaJqzmgXD+uR+FU4KUN3xvkkyDYbaFAtzye IfUI4JK53h9dC0OXp1kDajA= X-Google-Smtp-Source: APXvYqzgYe4ajgrhATDQ9F//iqjw7ldXeEGVujveh+CKh7xY4TgkUx2J3xD/OQyd/7OOX6j2wdO6dw== X-Received: by 2002:a5d:484e:: with SMTP id n14mr617671wrs.348.1559732418618; Wed, 05 Jun 2019 04:00:18 -0700 (PDT) Received: from [192.168.1.3] ([185.105.174.23]) by smtp.googlemail.com with ESMTPSA id v184sm7053466wme.10.2019.06.05.04.00.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jun 2019 04:00:18 -0700 (PDT) Subject: Re: bug#32158: 26.1; Broken JSX indentation in case of arrow function passing to props From: Dmitry Gutov To: Jackson Ray Hamilton , 32158-done@debbugs.gnu.org References: <2e0ccd59-e688-645c-eada-c4c85ff88b8a@jacksonrayhamilton.com> Message-ID: Date: Wed, 5 Jun 2019 14:00:16 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32158-done Cc: valentignatev@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 05.06.2019 13:58, Dmitry Gutov wrote: > Jackson, here's a slight variation on this example that looks problematic: > > const foo = (props) => ( >    
>       cat={i => i} /> > >  
> ); > > (Note the empty line) > > That seems incorrect to me. Sorry, never mind. I had to enable js-jsx-mode to test it properly. So, closing. Note that you can do it yourself by appending -done to a bug email. ------------=_1559732463-11503-7 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 23 Jan 2018 01:29:11 +0000 Received: from localhost ([127.0.0.1]:38810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ednOg-0006CD-M3 for submit@debbugs.gnu.org; Mon, 22 Jan 2018 20:29:10 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48901) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ednOf-0006Bz-4w for submit@debbugs.gnu.org; Mon, 22 Jan 2018 20:29:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ednOY-0004Na-Oi for submit@debbugs.gnu.org; Mon, 22 Jan 2018 20:29:04 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:57762) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ednOY-0004NH-LJ for submit@debbugs.gnu.org; Mon, 22 Jan 2018 20:29:02 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39844) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ednOX-0005WW-92 for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 20:29:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ednOT-0004LU-AP for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 20:29:01 -0500 Received: from mail-pg0-x22c.google.com ([2607:f8b0:400e:c05::22c]:43893) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ednOT-0004L0-3C for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 20:28:57 -0500 Received: by mail-pg0-x22c.google.com with SMTP id n17so8503381pgf.10 for ; Mon, 22 Jan 2018 17:28:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=vll5CLtljRaps9HObUBCimmxDEIG5xG5Wiln3TQUzkw=; b=Ohkuz899CeQW4vHkSiAV9s9j9pzOOg3hZnv2UqpNHrKZ03S4IFTCmBFDhdBd4EcA+u vLOIX1BDZWPyq0sBOeEBP0exLpxQGQsirfasD6fFGgzvASsm8FrTWdc3d91/6IPV4Tiw yBVuhOBabT/WIY3+cSrsYz40F5OiAJrVaCnBj5ugtc2LVuz4pJtinKyEw3ZEQvurXuuy l3Ecz3jUdezZZFtqcMCaxreGLceZnuKt8IlAEAie0QmDkeY0ZbgMFHIcwTDlkSsAEkz/ V2u5JGIcynjicPOq8i19Dk9d3iszCtKsiF1vgYFkBYcG4ky8MpmScHrMIJ+A8nnuhTlj ePGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=vll5CLtljRaps9HObUBCimmxDEIG5xG5Wiln3TQUzkw=; b=jsplni59PGIU46+mqn2TamOZSIoU54G2tJprOHfPTaiCMLcsfZHXbJJqjk3Sq5PRkR R//zn8K3LDuboCqjkTkVEy6RUTSWbFghXXK2vb+C5jlRgQRx1j3DrqyGBX1Eg/GtpIPp rEfCD7ZX3Rul7Fkd/2aZgI1DCQtGJfOI4L8cFUqQJeHsAvh7W7gTwqTdk4hxGd0zOux1 GiaE51u+6Yd79rrB7nb9bXd/SvvNnAh3/OCrpd1s93CIk3iIqKtCneHfobtuNp79xNID 6pXCLeBsz3jZuKE57SlxLAXrI3r0UHHR180leYIKjZuXoLOXodNLg/QiSik2P5580mFi 3XDg== X-Gm-Message-State: AKwxytcYrD5LV+BOCgVVlBccCvIB7rF/R8cdHjgNb7Pvjq/oETkRMUpA ktfxGMm9XSlSbVFBHKUYG4D7ajd1 X-Google-Smtp-Source: AH8x226VNEA0kHF6KE64xRL8cVIwQovAOASZRejCpKAQHOA4Uv0HLEnuVfp8fwDNXxwcQgRS1wAdOw== X-Received: by 10.98.36.77 with SMTP id r74mr9345072pfj.31.1516670935204; Mon, 22 Jan 2018 17:28:55 -0800 (PST) Received: from grinchel ([138.68.227.113]) by smtp.gmail.com with ESMTPSA id g77sm2032735pfk.49.2018.01.22.17.28.54 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jan 2018 17:28:54 -0800 (PST) From: Mitchel Humpherys To: bug-gnu-emacs@gnu.org Subject: 27.0.50; jsx: Arrow function in attribute breaks indentation Date: Mon, 22 Jan 2018 17:27:53 -0800 Message-ID: <87shaxe546.fsf@grinchel.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) I've noticed an indentation bug in js-jsx-mode. The following code doesn't indent properly (note the `value` attribute on the `select`): class MySelect extends React.Component { constructor(props) { super(props); this.state = { value: "", }; } render() { return ( ); } } However, when I move the `onChange` arrow function out it indents fine: class MySelect extends React.Component { constructor(props) { super(props); this.state = { value: "", }; this.onChange = this.onChange.bind(this); } render() { return ( ); } onChange(e) { this.setState({value: e.target.value}); } } In GNU Emacs 27.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.26) of 2018-01-22 built on grinchel Repository revision: 2df391c202eeee0d575980555443a5e81b8f6b1f Windowing system distributor 'Fedora Project', version 11.0.11906000 System Description: Fedora release 27 (Twenty Seven) Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Mark set [2 times] Indenting region...done user-error: Beginning of history; no preceding item Making completion list... user-error: Beginning of history; no preceding item Configured using: 'configure --prefix=/home/mgalgs/opt/emacs-git' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 THREADS LCMS2 Important settings: value of $LC_CTYPE: en_US.UTF-8 value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: JSX Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils js advice sgml-mode dom json map seq byte-opt gv bytecomp byte-compile cconv imenu thingatpt cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cl-loaddefs cl-lib elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 121749 8471) (symbols 48 23352 1) (miscs 40 54 97) (strings 32 37829 1944) (string-bytes 1 1118347) (vectors 16 17941) (vector-slots 8 534418 8920) (floats 8 52 297) (intervals 56 243 0) (buffers 992 13)) ------------=_1559732463-11503-7--