From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= Newsgroups: gmane.emacs.bugs Subject: bug#19946: 24.4; js-mode, indentation Date: Sun, 20 Mar 2016 20:15:12 +0100 Message-ID: <1458501312.1741368.554560954.76F75ED3@webmail.messagingengine.com> 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> <56EEF3D8.1020106@dancol.org> Reply-To: jostein@kjonigsen.net NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1458501382 7875 80.91.229.3 (20 Mar 2016 19:16:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Mar 2016 19:16:22 +0000 (UTC) Cc: 19946@debbugs.gnu.org, dan.colascione@gmail.com To: Daniel Colascione , 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:16:13 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 1ahiph-0003xR-8b for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Mar 2016 20:16:13 +0100 Original-Received: from localhost ([::1]:54171 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahipg-0002qd-AZ for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Mar 2016 15:16:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46228) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahipb-0002nx-Hd for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2016 15:16:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ahipX-0006Sz-1Z for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2016 15:16:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58697) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahipW-0006Sh-SD for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2016 15:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ahipW-0003ac-J5 for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2016 15:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Mar 2016 19:16:02 +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.145850131513740 (code B ref 19946); Sun, 20 Mar 2016 19:16:02 +0000 Original-Received: (at 19946) by debbugs.gnu.org; 20 Mar 2016 19:15:15 +0000 Original-Received: from localhost ([127.0.0.1]:55824 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ahiol-0003ZY-6K for submit@debbugs.gnu.org; Sun, 20 Mar 2016 15:15:15 -0400 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:45410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ahioi-0003ZP-Os for 19946@debbugs.gnu.org; Sun, 20 Mar 2016 15:15:13 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id ACBB820987 for <19946@debbugs.gnu.org>; Sun, 20 Mar 2016 15:15:12 -0400 (EDT) Original-Received: from web5 ([10.202.2.215]) by compute4.internal (MEProxy); Sun, 20 Mar 2016 15:15:12 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= secure.kjonigsen.net; h=cc:content-transfer-encoding :content-type:date:from:in-reply-to:message-id:mime-version :references:reply-to:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=QAVS2OAxiZXDE03l/vP28sY374Q=; b=vhh5aA85x2pQZSmen7QceYQfjmeG H2PyC80CGQD3Y+NkZIoF/ySFliufTtcL2toKNC6f9dmSWWPSpja0OUiv8uhvZYDo yfU4QLyNp3c3tqcazlkglu0gQ4YcEIOTAQXLKXD4Fb1mD5EBvU8TozlZoyM6fSDu 5C2++/oYSTqxJQM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :reply-to:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=QAVS2O AxiZXDE03l/vP28sY374Q=; b=qUvdn0IGAjiNa4HSs8En5WXP59/ilvk76/lFRQ kHixIXQZQ+mLRJiBHe3EgS2NRZYIWH3EIUSr08qSoOPeU7+Y4RiCfsUfmDG5zZmz puPKG1VJlGr8Ku9rB1OVOm8QNL9AmQoxaDH78wkLnjCIfvCXxUMjnu6wS6ucOzSE lYRYQ= Original-Received: by web5.nyi.internal (Postfix, from userid 99) id 6A37AA6A29E; Sun, 20 Mar 2016 15:15:12 -0400 (EDT) X-Sasl-Enc: f8XAzpPuUkE5uaRn0qsfnHOIInk4BMNzEWe/5HkJ0m+t 1458501312 X-Mailer: MessagingEngine.com Webmail Interface - ajax-872772a7 In-Reply-To: <56EEF3D8.1020106@dancol.org> 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:115167 Archived-At: On Sun, Mar 20, 2016, at 08:02 PM, Daniel Colascione wrote: > 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. I appreciate being principled about correctness and fixing the real problems where they are. I really do. But I'm also trying to be pragmatic when the real world calls. While your argument definitely sounds reasonable at first, it's worth noting that this problem often occurs in distributed projects where some files end up with mixed line-break formats (due to bad source-control settings or whatever). In those cases line-ending translation cannot be done "correctly" because the file does not adher to one standard only, and unless the user is aware of this, he will simply blame Emacs as "broken" when indentation suddenly goes crazy in his file. If we should at least attempt to adhere to the principle of least astonishment, we need to either accept \r\n patches everywhere or change the semantics of $ to also include \r, line-break format be damned. Or do someone have another option which involves less drastic means? In that case I'm all ears. --=20 Jostein Kj=F8nigsen jostein@kjonigsen.net / jostein@secure.kjonigsen.net