bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19946: 24.4; js-mode, indentation


From: Jostein Kjønigsen
Subject: bug#19946: 24.4; js-mode, indentation
Date: Sun, 20 Mar 2016 20:15:12 +0100

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 via email to

[Prev in Thread] Current Thread [Next in Thread]