GNU bug report logs - #32158
26.1; Broken JSX indentation in case of arrow function passing to props

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Valentin Ignatev <valentignatev@HIDDEN>; merged with #24896, #26001, #30225; dated Sat, 14 Jul 2018 16:11:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Forcibly Merged 24896 26001 30225 32158. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 14 Jul 2018 16:10:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jul 14 12:10:59 2018
Received: from localhost ([127.0.0.1]:60250 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1feN8M-0004ag-QU
	for submit <at> 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 <valentignatev@HIDDEN>) id 1feMxI-0004Ha-7F
 for submit <at> 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 <valentignatev@HIDDEN>) id 1feMxB-0004au-Aa
 for submit <at> 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 <valentignatev@HIDDEN>)
 id 1feMxB-0004ag-5i
 for submit <at> 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 <valentignatev@HIDDEN>) id 1feMx9-0007Sw-A0
 for bug-gnu-emacs@HIDDEN; Sat, 14 Jul 2018 11:59:24 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <valentignatev@HIDDEN>) id 1feMx7-0004XO-NG
 for bug-gnu-emacs@HIDDEN; 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 <valentignatev@HIDDEN>)
 id 1feMx7-0004WS-BJ
 for bug-gnu-emacs@HIDDEN; Sat, 14 Jul 2018 11:59:21 -0400
Received: by mail-wr1-x42b.google.com with SMTP id b15-v6so27853772wrv.10
 for <bug-gnu-emacs@HIDDEN>; 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 <valentignatev@HIDDEN>
Date: Sun, 15 Jul 2018 02:04:11 +1000
Message-ID: <CADXmXkiy2aPfaWnp9002GkW2AGqZ8xYd-MviPJnO+oKbtEf0Zw@HIDDEN>
Subject: 26.1;
 Broken JSX indentation in case of arrow function passing to props
To: bug-gnu-emacs@HIDDEN
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 <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
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) => (
    <div>
      <input
    cat={i => i} />
    </div>
);

Then put cursor after closing input part (/>) and hit <RET>. 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

<div dir=3D"ltr">Start with emacs -Q, create new jsx file, paste following =
content:<br>const foo =3D (props) =3D&gt; (<br>=C2=A0=C2=A0=C2=A0 &lt;div&g=
t;<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &lt;input<br>=C2=A0=C2=A0=C2=A0 cat=3D=
{i =3D&gt; i} /&gt;=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <br>=C2=A0=C2=A0=C2=A0 &l=
t;/div&gt;<br>);<br><br>Then put cursor after closing input part (/&gt;) an=
d hit &lt;RET&gt;. Cursor will<br>end rith below the &quot;c&quot; in &quot=
;cat&quot;, but it expected to be below open<br>bracket &quot;&lt;&quot;. I=
f I remove &quot;{i =3D&gt; i}&quot;, then indentation behavior works in<br=
>an expected manner.<br><br>In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu=
, GTK+ Version 3.22.30)<br>=C2=A0of 2018-07-05 built on juergen<br>Windowin=
g system distributor &#39;The X.Org Foundation&#39;, version 11.0.12000000<=
br>Recent messages:<br>previous-line: Beginning of buffer [2 times]<br>Mark=
 set<br>C-M-g is undefined<br>Mark set<br>Mark deactivated<br>Mark set<br>C=
-M-g is undefined<br>Quit<br>Mark set<br>Auto-saving...done<br><br>Configur=
ed using:<br>=C2=A0&#39;configure --prefix=3D/usr --sysconfdir=3D/etc --lib=
execdir=3D/usr/lib<br>=C2=A0--localstatedir=3D/var --with-x-toolkit=3Dgtk3 =
--with-xft --with-modules<br>=C2=A0&#39;CFLAGS=3D-march=3Dx86-64 -mtune=3Dg=
eneric -O2 -pipe -fstack-protector-strong<br>=C2=A0-fno-plt&#39; CPPFLAGS=
=3D-D_FORTIFY_SOURCE=3D2<br>=C2=A0LDFLAGS=3D-Wl,-O1,--sort-common,--as-need=
ed,-z,relro,-z,now&#39;<br><br>Configured features:<br>XPM JPEG TIFF GIF PN=
G RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY<br>ACL GNUTLS LIBXML2 FR=
EETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS<br>GTK3 X11 MODULES THR=
EADS LIBSYSTEMD LCMS2<br><br>Important settings:<br>=C2=A0 value of $LC_ALL=
: en_US.UTF-8<br>=C2=A0 value of $LC_CTYPE: en_US.UTF-8<br>=C2=A0 value of =
$LANG: en_US.UTF-8<br>=C2=A0 locale-coding-system: utf-8-unix<br><br>Major =
mode: JSX<br><br>Minor modes in effect:<br>=C2=A0 diff-auto-refine-mode: t<=
br>=C2=A0 tooltip-mode: t<br>=C2=A0 global-eldoc-mode: t<br>=C2=A0 electric=
-indent-mode: t<br>=C2=A0 mouse-wheel-mode: t<br>=C2=A0 tool-bar-mode: t<br=
>=C2=A0 menu-bar-mode: t<br>=C2=A0 file-name-shadow-mode: t<br>=C2=A0 globa=
l-font-lock-mode: t<br>=C2=A0 font-lock-mode: t<br>=C2=A0 blink-cursor-mode=
: t<br>=C2=A0 auto-composition-mode: t<br>=C2=A0 auto-encryption-mode: t<br=
>=C2=A0 auto-compression-mode: t<br>=C2=A0 line-number-mode: t<br>=C2=A0 tr=
ansient-mark-mode: t<br><br>Load-path shadows:<br>None found.<br><br>Featur=
es:<br>(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddef=
s<br>format-spec rfc822 mml mml-sec password-cache epa derived epg epg-conf=
ig<br>gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-par=
se<br>rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045<br>i=
etf-drums mm-util mail-prsvr mail-utils apropos help-mode vc-git<br>diff-mo=
de easy-mmode js advice sgml-mode dom json map seq byte-opt gv<br>bytecomp =
byte-compile cconv imenu thingatpt cc-mode cc-fonts easymenu<br>cc-guess cc=
-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs<br>cl-loaddefs =
cl-lib elec-pair time-date mule-util tooltip eldoc electric<br>uniquify edi=
ff-hook vc-hooks lisp-float-type mwheel term/x-win x-win<br>term/common-win=
 x-dnd tool-bar dnd fontset image regexp-opt fringe<br>tabulated-list repla=
ce newcomment text-mode elisp-mode lisp-mode<br>prog-mode register page men=
u-bar rfn-eshadow isearch timer select<br>scroll-bar mouse jit-lock font-lo=
ck syntax facemenu font-core<br>term/tty-colors frame cl-generic cham georg=
ian utf-8-lang misc-lang<br>vietnamese tibetan thai tai-viet lao korean jap=
anese eucjp-ms cp51932<br>hebrew greek romanian slovak czech european ethio=
pic indian cyrillic<br>chinese composite charscript charprop case-table epa=
-hook jka-cmpr-hook<br>help simple abbrev obarray minibuffer cl-preloaded n=
advice loaddefs<br>button faces cus-face macroexp files text-properties ove=
rlay sha1 md5<br>base64 format env code-pages mule custom widget hashtable-=
print-readable<br>backquote dbusbind inotify lcms2 dynamic-setting system-f=
ont-setting<br>font-render-setting move-toolbar gtk x-toolkit x multi-tty<b=
r>make-network-process emacs)<br><br>Memory information:<br>((conses 16 132=
251 10105)<br>=C2=A0(symbols 48 24051 1)<br>=C2=A0(miscs 40 109 176)<br>=C2=
=A0(strings 32 40149 1453)<br>=C2=A0(string-bytes 1 1170542)<br>=C2=A0(vect=
ors 16 19446)<br>=C2=A0(vector-slots 8 548042 8566)<br>=C2=A0(floats 8 56 3=
81)<br>=C2=A0(intervals 56 576 0)<br>=C2=A0(buffers 992 14))<br><br></div>

--000000000000de12f20570f7ad0c--




Acknowledgement sent to Valentin Ignatev <valentignatev@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#32158; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 14 Jul 2018 16:30:02 UTC

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