bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#1039: 23.0.60; emacs forgets EOL convention after revert-buffer


From: Kenichi Handa
Subject: bug#1039: 23.0.60; emacs forgets EOL convention after revert-buffer
Date: Thu, 29 Jan 2009 13:20:49 +0900

> 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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]