unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jostein Kjønigsen" <jostein@secure.kjonigsen.net>
To: "Daniel Colascione" <dancol@dancol.org>,
	jostein@kjonigsen.net, "Dmitry Gutov" <dgutov@yandex.ru>,
	"Simen Heggestøyl" <simenheg@gmail.com>
Cc: 19946@debbugs.gnu.org, dan.colascione@gmail.com
Subject: bug#19946: 24.4; js-mode, indentation
Date: Sun, 20 Mar 2016 20:15:12 +0100	[thread overview]
Message-ID: <1458501312.1741368.554560954.76F75ED3@webmail.messagingengine.com> (raw)
In-Reply-To: <56EEF3D8.1020106@dancol.org>

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.

-- 
Jostein Kjønigsen
jostein@kjonigsen.net / jostein@secure.kjonigsen.net





  reply	other threads:[~2016-03-20 19:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-25 10:09 bug#19946: 24.4; js-mode, indentation Jostein Kjønigsen
2016-03-19 22:13 ` Simen Heggestøyl
2016-03-20  1:27   ` Dmitry Gutov
2016-03-20  8:25     ` Andreas Schwab
2016-03-20 19:01     ` Jostein Kjønigsen
2016-03-20 19:02       ` Daniel Colascione
2016-03-20 19:15         ` Jostein Kjønigsen [this message]
2016-04-03 18:05           ` John Wiegley
2016-04-03 18:17             ` Eli Zaretskii
2016-03-20 19:18       ` Dmitry Gutov
2016-03-20 19:47         ` Jostein Kjønigsen
2016-03-20 19:49           ` Dmitry Gutov
2016-03-21  0:08             ` Daniel Colascione
2016-03-21  0:32               ` Dmitry Gutov
2020-08-25  9:48     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1458501312.1741368.554560954.76F75ED3@webmail.messagingengine.com \
    --to=jostein@secure.kjonigsen.net \
    --cc=19946@debbugs.gnu.org \
    --cc=dan.colascione@gmail.com \
    --cc=dancol@dancol.org \
    --cc=dgutov@yandex.ru \
    --cc=jostein@kjonigsen.net \
    --cc=simenheg@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).