[Top][All Lists]

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

Re: EOL: unix/dos/mac

From: Stephen J. Turnbull
Subject: Re: EOL: unix/dos/mac
Date: Tue, 26 Mar 2013 10:42:38 +0900

Stefan Monnier writes:

 > BTW, in this same area, it would be good to detect and indicate
 > prominently "Unix with some CRLFs", also known as "mixed-line-ending",
 > which is often misunderstood as "my Emacs fails to recognize my CRLF
 > file".

Unicode doesn't care, you know: it considers all ASCII line breaks and
terminators to be the same thing (NEW LINE FUNCTION).  I haven't read
that part of the standard in a long time, but IIRC, although many
people interpolate "according to platform", Unicode doesn't care about
that, it just says "all of these sequences when encountered in text
purporting to conform to this standard should be treated in the same
way."  Emacsen should do the same.

The question then is how to deal with file comparison.  We'd like to
avoid creating spurious diffs based on "fixing" random different line
endings, so if the user doesn't edit those positions (lines?), the
line ending should be written as read.  I guess one could attach a
text property to newlines differing from the file's autodetected EOL

I've also considered switching the internal representation of newline
to U+2028 LINE SEPARATOR, but that's not at all pressing.


reply via email to

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