GNU bug report logs -
#19946
js-mode indentation with mixed Unix/DOS line endings
Previous Next
Reported by: jostein <at> kjonigsen.net
Date: Wed, 25 Feb 2015 16:45:03 UTC
Severity: minor
Tags: wontfix
Found in version 24.4
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #23 received at 19946 <at> debbugs.gnu.org (full text, mbox):
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 <at> kjonigsen.net / jostein <at> secure.kjonigsen.net
This bug report was last modified 5 years ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.