From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: mode line eol char indication Date: Wed, 31 Dec 2008 14:50:12 -0800 Message-ID: <005701c96b9a$243839d0$c2b22382@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1230763835 25999 80.91.229.12 (31 Dec 2008 22:50:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 31 Dec 2008 22:50:35 +0000 (UTC) To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 31 23:51:45 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LI9ud-0007IP-Sm for ged-emacs-devel@m.gmane.org; Wed, 31 Dec 2008 23:51:40 +0100 Original-Received: from localhost ([127.0.0.1]:49981 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LI9tP-0006bd-NQ for ged-emacs-devel@m.gmane.org; Wed, 31 Dec 2008 17:50:23 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LI9tL-0006ad-0Q for emacs-devel@gnu.org; Wed, 31 Dec 2008 17:50:19 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LI9tJ-0006Z1-DM for emacs-devel@gnu.org; Wed, 31 Dec 2008 17:50:18 -0500 Original-Received: from [199.232.76.173] (port=54064 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LI9tJ-0006Yu-0F for emacs-devel@gnu.org; Wed, 31 Dec 2008 17:50:17 -0500 Original-Received: from acsinet11.oracle.com ([141.146.126.233]:20944) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LI9tI-0008Vg-Lv for emacs-devel@gnu.org; Wed, 31 Dec 2008 17:50:16 -0500 Original-Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by acsinet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mBVMpalp010378 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 31 Dec 2008 22:51:37 GMT Original-Received: from acsmt707.oracle.com (acsmt707.oracle.com [141.146.40.85]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mBVMi8un006010 for ; Wed, 31 Dec 2008 22:44:10 GMT Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 31 Dec 2008 22:50:09 +0000 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AclrmiOrI52KlygXQMOniuytNRhLtQ== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Source-IP: acsmt707.oracle.com [141.146.40.85] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090209.495BF723.0061:SCFSTAT928724,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:107485 Archived-At: The Emacs manual, node Mode Line, explains the eol character indication this way: The character after CS is usually a colon. However, under some circumstances a different string is displayed, which indicates a nontrivial end-of-line convention. Usually, lines of text are separated by "newline characters", but two other conventions are sometimes used. The MS-DOS convention is to use a "carriage-return" character followed by a "linefeed" character; when editing such files, the colon changes to either a backslash (`\') or `(DOS)', depending on the operating system. The Macintosh end-of-line convention is to use a "carriage-return" character instead of a newline; when editing such files, the colon indicator changes to either a forward slash (`/') or `(Mac)'. On some systems, Emacs displays `(Unix)' instead of the colon for files that use newline as the line separator. That's quite a mouthful. I wonder now about this convention, which I've lived with for decades without wondering ;-). * The non-"nontrivial" eol convention, represented by `:', is presumably what is meant by "usually", that is, a newline char. But a newline eol is also sometimes represented by `(Unix)'. Why? And why is this called "nontrivial" - why is it more nontrivial and more usual than the other possibilities? * `\' is used sometimes to represent carriage return (C-m) followed by newline (C-j), but sometimes `(DOS)' is used to represent the same eol chars. * `/' is used sometimes to represent C-m, but sometimes `(Mac)' is used to represent the same same eol char. Why `:'? Why `\' (is there some relation to the DOS directory separator?)? Why `/'? Why so many variations - both `:' and `(Unix)'; both `\' and `(DOS)'; both `/' and `(Mac)'? None of those labels are particularly helpful, IMO. And there's no telling when one or the other of the equivalent alternatives will be used, apparently. Why not (always) use the Emacs standard representation of the actual eol chars? IOW: * \n instead of : and (Unix) * \r instead of / and (Mac) * \n\r instead of \ and (DOS) That's 4 chars max instead of 6 chars max, and it's more explicit. We might even want to move this end-of-line indication to, well, the end of the mode line (far right). That would be a little mnemonic: what you see at the end of the line is what is used at the buffer's line endings. Unless I'm missing something, the current system is not too systematic and not too obvious. \n, \r, or \n\r is clear. It even lets you know, for MS DOS/Windows, that the newline comes before the carriage return, not the reverse (though you probably don't care).