From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: EOL: unix/dos/mac Date: Wed, 27 Mar 2013 01:16:36 +0900 Message-ID: <87y5dab0gr.fsf@uwakimon.sk.tsukuba.ac.jp> References: <87ip4fc4xd.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: ger.gmane.org 1364314605 32496 80.91.229.3 (26 Mar 2013 16:16:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Mar 2013 16:16:45 +0000 (UTC) Cc: Per =?utf-8?Q?Starb=C3=A4ck?= , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 26 17:17:11 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UKWYf-0003Nj-G3 for ged-emacs-devel@m.gmane.org; Tue, 26 Mar 2013 17:17:09 +0100 Original-Received: from localhost ([::1]:47543 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKWYH-0002wm-GX for ged-emacs-devel@m.gmane.org; Tue, 26 Mar 2013 12:16:45 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKWYD-0002sZ-6i for emacs-devel@gnu.org; Tue, 26 Mar 2013 12:16:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKWYB-0005zl-BD for emacs-devel@gnu.org; Tue, 26 Mar 2013 12:16:41 -0400 Original-Received: from mgmt2.sk.tsukuba.ac.jp ([130.158.97.224]:49470) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKWYB-0005zL-1G for emacs-devel@gnu.org; Tue, 26 Mar 2013 12:16:39 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mgmt2.sk.tsukuba.ac.jp (Postfix) with ESMTP id 6CD9C970909; Wed, 27 Mar 2013 01:16:36 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 301941A3D97; Wed, 27 Mar 2013 01:16:36 +0900 (JST) In-Reply-To: X-Mailer: VM undefined under 21.5 (beta32) "habanero" b0d40183ac79 XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 130.158.97.224 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:158224 Archived-At: Stefan Monnier writes: > > Unicode doesn't care, you know: it considers all ASCII line breaks and > > terminators to be the same thing (NEW LINE FUNCTION). > > But when saving the file, which line ends would we use? > For pre-existing line-ends, we could reproduce what was there before, > but what about new lines? Basically, what Eli said. To remind you how flexible this is: The file coding system including EOL convention would be determined as it currently: a specific argument to write-file or the binding of buffer-file-coding-system, in that order. The last would be determined as currently: user's explicit setting, various settings based on alists, and finally heuristic autodetection based on file contents and platform convention for new/empty files. We'd need an additional control variable: whether to automatically convert variant NLFs to the EOL convention for writing. Or perhaps this should be done on reading. And a command to do it at the user's convenience.