|
From: | David De La Harpe Golden |
Subject: | Re: mode line eol char indication |
Date: | Thu, 01 Jan 2009 19:14:58 +0000 |
User-agent: | Mozilla-Thunderbird 2.0.0.17 (X11/20081018) |
Juanma Barranquero wrote:
On Thu, Jan 1, 2009 at 19:11, Drew Adams <address@hidden> wrote:So you are arguing that it is the system/platform name that is more meaningful to users, not the eol characters. I'm OK with that.I'm not. \n, \r and \r\n (or ^J, etc) are exact: what they say is what the file contains. "Unix", "DOS" and "Mac" are just hints about the likely origin. Is not like it is impossible to create CRLF files under GNU/Linux, or LF files on Windows.
I agree with Juanma on the exactness issue. Emacs is still first and foremost a text editor, line endings are a pretty unavoidable aspect of editing text files. And LF-ending files are not particularly
uncommon on windows in my experience (which mostly involves windowsboxes being used as little more than access terminals for less sucky computers, mind).
I kinda dislike \n since in C \n doesn't mean LF in general since it's defined to translate to whatever the native newline sequence is in files opened in text mode IIRC.
CR/LF/CRLF are nicely descriptive, though CRLF is a bit long.CR/LF/CL are all the same length, and there is no ASCII nonprinting character called CL AFAIK.
^M/^J/^M^J are similarly descriptive, and have the possible advantage that one can directly concatenate them to other things and they will still stand out somewhat, like /\: do, thanks to the caret.
BTW, Unicode specs printable representations for ascii control characters - see U+240A and U+240D. On unicode text terminals and graphical displays, might be nice to just use them?
http://unicode.org/charts/PDF/U2400.pdf ␍/␊/␍␊Possible disadvantage being that not all fonts might include them I guess, and some might supply peculiar glyphs for them (on my system
they're just quite nice little mini cr and lf signs, shrug).
[Prev in Thread] | Current Thread | [Next in Thread] |