all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: 4533@debbugs.gnu.org
Subject: bug#4533: 23.1: reverting fails to update line ending mode line
Date: Sun, 14 Nov 2010 04:51:13 -0500	[thread overview]
Message-ID: <E1PHZEv-0005Tf-LV@fencepost.gnu.org> (raw)
In-Reply-To: <87mxpcc115.fsf@stupidchicken.com> (message from Chong Yidong on Sat, 13 Nov 2010 17:27:18 -0500)

> From: Chong Yidong <cyd@stupidchicken.com>
> Date: Sat, 13 Nov 2010 17:27:18 -0500
> Cc: 4533@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.





  reply	other threads:[~2010-11-14  9:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-23  2:01 bug#4533: 23.1: reverting fails to update line ending mode line Benjamin Peterson
2009-10-03  0:16 ` Glenn Morris
2009-11-05  4:17 ` Kenichi Handa
2010-11-13 22:27 ` Chong Yidong
2010-11-14  9:51   ` Eli Zaretskii [this message]
2010-11-14 17:32     ` Chong Yidong
2010-11-14 20:23       ` Dani Moncayo
2010-11-14 20:46         ` Eli Zaretskii
2010-11-14 20:55           ` Dani Moncayo
2010-11-14 21:47             ` Dani Moncayo
2010-11-15 16:51   ` Stefan Monnier
2010-11-15 17:27     ` Chong Yidong
2013-02-10  3:09       ` Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1PHZEv-0005Tf-LV@fencepost.gnu.org \
    --to=eliz@gnu.org \
    --cc=4533@debbugs.gnu.org \
    --cc=cyd@stupidchicken.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.