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

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

bug#4533: i can reproduce this


From: Glenn Morris
Subject: bug#4533: i can reproduce this
Date: Mon, 02 Nov 2009 03:11:16 -0500
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

tags 4533 =
stop

Jack Tanner wrote:

> - Start emacs -Q .
> - C-x C-f ~/foo.txt, creating a new file.
> - Enter text: 
> Line 1
> Line 2
>
> - C-x C-s.
> - dos2unix ~/foo.txt
> - M-x revert-buffer

Thanks for the recipe. Saving the file was the missing step.

The issue seems to be that saving a file causes basic-save-buffer-1 to
set buffer-file-coding-system-explicit. Eg for me on GNU/Linux, it is
set to (iso-latin-1-unix). revert-buffer uses this to set
coding-system-for-read before it inserts the file contents. So the
change in line ending is ignored. If I manually set
buffer-file-coding-system-explicit to nil before reverting the buffer,
the change in line ending is noticed.

I don't know what the right fix is though.





reply via email to

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