From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: "Per Starbäck" <per.starback@gmail.com>, emacs-devel@gnu.org
Subject: Re: EOL: unix/dos/mac
Date: Tue, 26 Mar 2013 10:42:38 +0900 [thread overview]
Message-ID: <87ip4fc4xd.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <jwv620fl2p8.fsf-monnier+emacs@gnu.org>
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
convention.
I've also considered switching the internal representation of newline
to U+2028 LINE SEPARATOR, but that's not at all pressing.
Steve
next prev parent reply other threads:[~2013-03-26 1:42 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-25 13:34 EOL: unix/dos/mac Per Starbäck
2013-03-25 13:56 ` Xue Fuqiao
2013-03-25 22:41 ` Richard Stallman
2013-03-26 2:11 ` Stephen J. Turnbull
2013-03-25 14:21 ` Eli Zaretskii
2013-03-25 17:28 ` Dani Moncayo
2013-03-25 19:17 ` Stefan Monnier
2013-03-26 1:42 ` Stephen J. Turnbull [this message]
2013-03-26 6:28 ` Eli Zaretskii
2013-03-26 7:45 ` Stephen J. Turnbull
2013-03-26 8:42 ` Eli Zaretskii
2013-03-26 11:47 ` Stephen J. Turnbull
2013-03-26 13:07 ` Eli Zaretskii
2013-03-26 18:12 ` Stephen J. Turnbull
2013-03-26 18:44 ` Eli Zaretskii
2013-03-27 5:10 ` Stephen J. Turnbull
2013-03-26 12:51 ` Stefan Monnier
2013-03-26 13:10 ` Eli Zaretskii
2013-03-26 17:16 ` Stefan Monnier
2013-03-26 17:47 ` Eli Zaretskii
2013-03-26 18:41 ` Stephen J. Turnbull
2013-03-26 16:16 ` Stephen J. Turnbull
2013-03-26 14:02 ` Alan Mackenzie
2013-03-26 14:19 ` Eli Zaretskii
2013-03-26 18:34 ` Stephen J. Turnbull
2013-03-26 7:53 ` Ulrich Mueller
2013-03-26 12:53 ` Stefan Monnier
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ip4fc4xd.fsf@uwakimon.sk.tsukuba.ac.jp \
--to=stephen@xemacs.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=per.starback@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.