From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.bugs Subject: bug#1039: 23.0.60; emacs forgets EOL convention after revert-buffer Date: Thu, 29 Jan 2009 13:20:49 +0900 Message-ID: Reply-To: Kenichi Handa , 1039@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1233204226 10406 80.91.229.12 (29 Jan 2009 04:43:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 Jan 2009 04:43:46 +0000 (UTC) Cc: cyd@stupidchicken.com, rfrancoise@debian.org, pdewacht@gmail.com, handa@m17n.org To: 1039@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 29 05:44:59 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LSOlu-0007Ly-K2 for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Jan 2009 05:44:58 +0100 Original-Received: from localhost ([127.0.0.1]:34558 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LSOkc-0007r8-3z for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Jan 2009 23:43:38 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LSOkX-0007ql-LV for bug-gnu-emacs@gnu.org; Wed, 28 Jan 2009 23:43:33 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LSOkW-0007q2-Vs for bug-gnu-emacs@gnu.org; Wed, 28 Jan 2009 23:43:33 -0500 Original-Received: from [199.232.76.173] (port=47324 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LSOkW-0007ph-Mr for bug-gnu-emacs@gnu.org; Wed, 28 Jan 2009 23:43:32 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:49453) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LSOkW-0005Ir-5b for bug-gnu-emacs@gnu.org; Wed, 28 Jan 2009 23:43:32 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0T4hUqS031676; Wed, 28 Jan 2009 20:43:30 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n0T4U3kj028284; Wed, 28 Jan 2009 20:30:03 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Kenichi Handa Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 29 Jan 2009 04:30:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 1039 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: patch Original-Received: via spool by 1039-submit@emacsbugs.donarmstrong.com id=B1039.123320285226952 (code B ref 1039); Thu, 29 Jan 2009 04:30:03 +0000 Original-Received: (at 1039) by emacsbugs.donarmstrong.com; 29 Jan 2009 04:20:52 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0T4Km2x026945 for <1039@emacsbugs.donarmstrong.com>; Wed, 28 Jan 2009 20:20:49 -0800 Original-Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id n0T4KfGE010630; Thu, 29 Jan 2009 13:20:41 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp2.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id n0T4Kf8w000495; Thu, 29 Jan 2009 13:20:41 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp2.aist.go.jp with ESMTP id n0T4Kdn1006904; Thu, 29 Jan 2009 13:20:39 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1LSOOX-0007ow-Oj; Thu, 29 Jan 2009 13:20:49 +0900 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Wed, 28 Jan 2009 23:43:33 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:24701 Archived-At: > If you load a file with DOS line endings, and revert it with M-x > revert-buffer, emacs forgets the used EOL convention and will use > Unix line endings when writing the file. This problem is already fixed. > That patch fixes the bug I reported, but it creates a new one: if you > change the EOL convention outside of emacs, revert-buffer no longer > detects this. To reproduce: > > printf "hello\r\nworld\r\n" > hello > emacs -Q hello & > printf "hello\rworld\r" > hello > M-x revert-buffer > # emacs still sees DOS newlines This is already fixed too. But, the problem is the case that you load "hello" by explicitly specifying dos coding system, or you once save the file by dos coding sytem before reverting. In this case, Emacs respects your specification, and thus revert-buffer loads the file as dos coding system, which results in seeing many CR charaters in the above case. We think this behaviour is not a bug but a feature. --- Kenichi Handa handa@m17n.org