GNU bug report logs - #4533
23.1: reverting fails to update line ending mode line

Previous Next

Package: emacs;

Reported by: Benjamin Peterson <benjamin <at> python.org>

Date: Wed, 23 Sep 2009 02:10:05 UTC

Severity: normal

Merged with 13256

Found in version 24.1

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #20 received at control <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Jack Tanner <ihok <at> hotmail.com>
Cc: 4533 <at> debbugs.gnu.org
Subject: Re: bug#4533: i can reproduce this
Date: Mon, 02 Nov 2009 03:11:16 -0500
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.



This bug report was last modified 12 years and 108 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.