From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Valentin Ignatev Newsgroups: gmane.emacs.bugs Subject: bug#32158: 26.1; Broken JSX indentation in case of arrow function passing to props Date: Sun, 15 Jul 2018 02:04:11 +1000 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000de12f20570f7ad0c" X-Trace: blaine.gmane.org 1531584547 11641 195.159.176.226 (14 Jul 2018 16:09:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 14 Jul 2018 16:09:07 +0000 (UTC) To: 32158@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 14 18:09:03 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1feN6T-0002uR-Gp for geb-bug-gnu-emacs@m.gmane.org; Sat, 14 Jul 2018 18:09:01 +0200 Original-Received: from localhost ([::1]:41895 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1feN8a-0003nd-CT for geb-bug-gnu-emacs@m.gmane.org; Sat, 14 Jul 2018 12:11:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1feN8S-0003nU-GQ for bug-gnu-emacs@gnu.org; Sat, 14 Jul 2018 12:11:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1feN8Q-0006Wc-Le for bug-gnu-emacs@gnu.org; Sat, 14 Jul 2018 12:11:04 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52353) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1feN8Q-0006WV-IF for bug-gnu-emacs@gnu.org; Sat, 14 Jul 2018 12:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1feN8Q-0004b1-Cd for bug-gnu-emacs@gnu.org; Sat, 14 Jul 2018 12:11:02 -0400 X-Loop: help-debbugs@gnu.org 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: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.153158465917655 (code B ref -1); Sat, 14 Jul 2018 16:11:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Jul 2018 16:10:59 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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) 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-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 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:148529 Archived-At: --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--