From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.bugs Subject: bug#19946: 24.4; js-mode, indentation Date: Sun, 20 Mar 2016 12:02:48 -0700 Message-ID: <56EEF3D8.1020106@dancol.org> References: <1424858977.3139392.232164745.05CFB51D@webmail.messagingengine.com> <87r3f6unew.fsf@gmail.com> <6420dbed-587e-87e1-e167-73359a65bf6b@yandex.ru> <1458500460.1739128.554550090.7C772DCA@webmail.messagingengine.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="O080vKHMFDBewVqT4cvvcd1PbRmBjLulX" X-Trace: ger.gmane.org 1458500611 28903 80.91.229.3 (20 Mar 2016 19:03:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Mar 2016 19:03:31 +0000 (UTC) Cc: 19946@debbugs.gnu.org, dan.colascione@gmail.com To: jostein@kjonigsen.net, Dmitry Gutov , Simen =?UTF-8?Q?Heggest=C3=B8yl?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Mar 20 20:03:15 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ahid8-0007Is-Lk for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Mar 2016 20:03:14 +0100 Original-Received: from localhost ([::1]:54128 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahid4-0000Wr-Lv for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Mar 2016 15:03:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43297) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahid1-0000WY-72 for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2016 15:03:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ahicw-0003cd-6e for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2016 15:03:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58691) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahicv-0003cR-W7 for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2016 15:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ahicv-0003Id-Pf for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2016 15:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Colascione Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Mar 2016 19:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19946 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19946-submit@debbugs.gnu.org id=B19946.145850058012676 (code B ref 19946); Sun, 20 Mar 2016 19:03:01 +0000 Original-Received: (at 19946) by debbugs.gnu.org; 20 Mar 2016 19:03:00 +0000 Original-Received: from localhost ([127.0.0.1]:55818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ahicu-0003IO-0w for submit@debbugs.gnu.org; Sun, 20 Mar 2016 15:03:00 -0400 Original-Received: from dancol.org ([96.126.100.184]:37182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ahicr-0003IE-Vp for 19946@debbugs.gnu.org; Sun, 20 Mar 2016 15:02:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject; bh=DhtfN3AIg3vf/l/CFuJDwG5fsQcsDS/LbYJ0NwP1Sks=; b=PldsUtmhBQPzN3PT/Suz9wjnz7yktOhHtYQZ4ocRJ/jtB97A8K7sa5aIP78B9wZFzW+806DvkEjt8J9rJ48llto+FUFVkLyRkLH4aioDpgsTV6tAcXZjHtDMcq1Rvkt/64iWr+b8ebPqWN4sFEjgv0/P8l3ySLYx5Ls2CTYqCWOnrwRKZhqvDmh5fhqknW3D2OEO+t4ipuoXikM/rhzIPyskZoRkcM4Igr5VipakdpSI0JS+XzoBamKqvYVKmmsfVi7A/or9bbUlddgm5m5f419aOjb8TUggFdWvoR1aQuxVYDquXQrMjaBQrHTm4kKaCgtRDFohzKwPcG9Cl7rzxQ==; Original-Received: from [2620:10d:c090:180::bc64] (helo=[IPv6:2620:10d:c081:1103:2ab2:bdff:fe1c:db58]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1ahicp-0007h5-I4; Sun, 20 Mar 2016 12:02:55 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 In-Reply-To: <1458500460.1739128.554550090.7C772DCA@webmail.messagingengine.com> 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:115166 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --O080vKHMFDBewVqT4cvvcd1PbRmBjLulX Content-Type: multipart/mixed; boundary="U2rq1M3eCPhfkHCdq59MXVtJNfULbIucp" From: Daniel Colascione To: jostein@kjonigsen.net, Dmitry Gutov , =?UTF-8?Q?Simen_Heggest=c3=b8yl?= Cc: 19946@debbugs.gnu.org, dan.colascione@gmail.com Message-ID: <56EEF3D8.1020106@dancol.org> Subject: Re: bug#19946: 24.4; js-mode, indentation References: <1424858977.3139392.232164745.05CFB51D@webmail.messagingengine.com> <87r3f6unew.fsf@gmail.com> <6420dbed-587e-87e1-e167-73359a65bf6b@yandex.ru> <1458500460.1739128.554550090.7C772DCA@webmail.messagingengine.com> In-Reply-To: <1458500460.1739128.554550090.7C772DCA@webmail.messagingengine.com> --U2rq1M3eCPhfkHCdq59MXVtJNfULbIucp Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 03/20/2016 12:01 PM, Jostein Kj=F8nigsen wrote: > On Sun, Mar 20, 2016, at 02:27 AM, Dmitry Gutov wrote: >> On 03/20/2016 12:13 AM, Simen Heggest=F8yl wrote: >> I do not mind, but I'm not sure if we actually want to support this=20 >> usage. There are a lot regexps in lisp/progmodes that use $. There are= =20 >> several in js-mode, aside from this one. >> >> Some modes try to match [\r\n] (like CC Mode), but in general they see= m=20 >> to be a minority, and even CC Mode doesn't do that consistently. >=20 > I really don't see how that argument makes sense. >=20 > By following the cardinal rule of good software, that is produce the > least amont of astonishment, cc-mode does what's right: it produces the= > expected outcome, no matter what kind of file it's working with. >=20 > The result: A happy user. >=20 > In my point of view, this should be the aim for all *-modes found in > Emacs, no matter what its current state of affair or conventions is. >=20 > The solution to this is either a bunch of hacky patches replacing $ wit= h > \r\n (as above) or actually addressing what's probably the root cause > (as observed by Andreas) >=20 >> I wonder why ?\r doesn't have whitespace syntax in the first place. >=20 > Make ?\r be interpreted as white-space, because once you put Emacs > outside a GNU/Linux system honestly nothing else makes sense. Is there > any specific reason for its current behaviour? >=20 > Or put the other way: Are there known pieces of code which depends on \= r > semantically not being white-space to function correctly? >=20 > As someone authoring two major modes, every time $ does not work as > expected and I need to write hacks, it breaks my heart. As of now, I > can't really use $ if I want my modes to work and that's just silly (bu= t > at least now I know why). Line ending divergence is best addressed at the file encoding level, not the individual mode level. I don't think it's worth while replacing uses of $ with \r?\n just to address cases in which line ending translation is broken. --U2rq1M3eCPhfkHCdq59MXVtJNfULbIucp-- --O080vKHMFDBewVqT4cvvcd1PbRmBjLulX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJW7vPZAAoJEN4WImmbpWBly9YP/3iIfOrlmszOTehjOSneN+9x nBa9GZ5DsrwmzRVHT9/ew7Bfdbr+Y5mib9K3hc51VLTPb36Q/NNoqTnNw0E8LQbS c2e59jBQJdAxamd6elVvmHXYrN1zQimgHfFJKG7S5GH6u4nV5mL0kY5af6nP4wTo fp4MzNekJ2XmNIbRopjAFgfDeGpMpKR1s+szmwJxEcOtrrQeSohb3A740uZ4gtTc CvRHK/ym0jMXoHa9sHg1W68vetIU/qjNQS5lEHZXlq5F/uc2rDXIIfitMma39+/f thdIgCM7HzNH32Vn2BSPKX5qZg2wnABWULRb2VsCbRvU1A6aR/KoEUl3fRrog2OW FcWT2ewKpEQVVeeWp8v2qklwS+Yycx60coXKNOQy7PzcdvRiHL1n+DVPSsEr2mr9 uFu3ty+CJowgEEHZdO1uH+DZT0yL1H9SaVuMCJYNnnIGsf+UrGbenyNx9aC/Bcwa eoy1+2fTYuQ0uH4G20KBXYwAxmJDlaQ3CQeY1lZNY3Eo0DOHUVFRTCDfA6iRp6E/ zZay2a0sDJg5l9WiFt21VEceSfrQSUZrZwKN+LgFlTmXvXwebCQjruZls6dPLMGr yEkl0bzmqsPA9d1NtGbmOsrLBKaGe/hA8cDhRzO+HCG9CMXiXAYy+d3F/rlsZn4y 2uNsj5pK+Tk95wKoPqhM =AQ6C -----END PGP SIGNATURE----- --O080vKHMFDBewVqT4cvvcd1PbRmBjLulX--