GNU bug report logs -
#4533
23.1: reverting fails to update line ending mode line
Previous Next
Full log
Message #50 received at 4533 <at> debbugs.gnu.org (full text, mbox):
> 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.