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


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 4533 <at> debbugs.gnu.org, handa <at> m17n.org
Subject: bug#4533: 23.1: reverting fails to update line ending mode line
Date: Sun, 14 Nov 2010 04:51:13 -0500
> From: Chong Yidong <cyd <at> stupidchicken.com>
> Date: Sat, 13 Nov 2010 17:27:18 -0500
> Cc: 4533 <at> debbugs.gnu.org
> 
> > - 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
> > - C-x k RET
> > - C-x C-f ~/foo.txt
> > Mode line shows --(Unix)---
> 
> The problem is that `C-x C-s' sets buffer-file-coding-system-explicit.
> This causes revert-buffer to set coding-system-for-read to that value
> (which is now incorrect) when inserting the file contents.  This is why
> the revert goes correctly if you omit the `C-x C-s' step.

Why is this a real problem?  I can handle this situation with

    C-x RET c undecided RET M-x revert-buffer RET

(Perhaps "C-x RET r" should be fixed to do the same, when given
`undecided' as the encoding.)

> I think the use of buffer-file-coding-system-explicit in revert-buffer
> is bogus, and should be removed---see below.  What do you think?

I'm not sure it's bogus.  Why do you think so?

Perhaps Handa-san remembers why this variable was introduced in the
first place.  I'm sure it was to solve some real-life problems.




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.