unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 4533@debbugs.gnu.org
Subject: bug#4533: 23.1: reverting fails to update line ending mode line
Date: Mon, 15 Nov 2010 12:27:39 -0500	[thread overview]
Message-ID: <87bp5qbipg.fsf@stupidchicken.com> (raw)
In-Reply-To: <jwvbp5qilcd.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 15 Nov 2010 11:51:36 -0500")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> 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?
>
> Its use is not bogus.  It's so that when a file's coding-system is
> incorrectly auto-detected, the user can force the use of a correct
> coding-system and subsequent revert-buffers won't disregard it.
>
> So maybe the problem is that C-x C-s should not set
> buffer-file-coding-system-explicit (unless the C-x C-s prompted the user
> to choose  a coding-system, I guess).

I see.  The comments in mule.el say that

;; This variable is set in these three cases:
;;   (1) A file is read by a coding system specified explicitly.
;;       after-insert-file-set-coding sets the car of this value to
;;       coding-system-for-read, and sets the cdr to nil.
;;   (2) A buffer is saved.
;;       After writing, basic-save-buffer-1 sets the car of this value
;;       to last-coding-system-used.
;;   (3) set-buffer-file-coding-system is called.
;;       The cdr of this value is set to the specified coding system.
;; This variable is used for decoding in revert-buffer and encoding in
;; select-safe-coding-system.

Indeed, this seems to imply that (2) can be omitted, as you suggest,
since "force selecting" a coding system should trigger (1) and (3).  Is
there any reason that (2) was originally included?





  reply	other threads:[~2010-11-15 17:27 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
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 [this message]
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87bp5qbipg.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --cc=4533@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).