all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Stephen J. Turnbull" <stephen@xemacs.org>
Cc: per.starback@gmail.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: EOL: unix/dos/mac
Date: Tue, 26 Mar 2013 08:28:36 +0200	[thread overview]
Message-ID: <831ub21xpn.fsf@gnu.org> (raw)
In-Reply-To: <87ip4fc4xd.fsf@uwakimon.sk.tsukuba.ac.jp>

> From: "Stephen J. Turnbull" <stephen@xemacs.org>
> Date: Tue, 26 Mar 2013 10:42:38 +0900
> Cc: Per Starbäck <per.starback@gmail.com>, emacs-devel@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.

That would require Emacs to store all the possible EOL sequences in
the buffer, and treat them all identically.  That's doable, but is a
non-trivial job; volunteers are welcome.

> 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

If Emacs is to support different EOL formats in the same file, it
should not convert them at all.  Anything else _will_ introduce
spurious modifications, and could even corrupt some files, if the
exact EOL sequence here or there matters.

> I guess one could attach a text property to newlines differing from
> the file's autodetected EOL convention.

Not sure how a text property should help here.

> I've also considered switching the internal representation of newline
> to U+2028 LINE SEPARATOR

What good would that be?




  reply	other threads:[~2013-03-26  6:28 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
2013-03-26  6:28     ` Eli Zaretskii [this message]
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=831ub21xpn.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=per.starback@gmail.com \
    --cc=stephen@xemacs.org \
    /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.