From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#4533: 23.1: reverting fails to update line ending mode line Date: Mon, 15 Nov 2010 12:27:39 -0500 Message-ID: <87bp5qbipg.fsf@stupidchicken.com> References: <1afaf6160909221901p527cca80jcbf81e589cde629d@mail.gmail.com> <87mxpcc115.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1289843244 9003 80.91.229.12 (15 Nov 2010 17:47:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 15 Nov 2010 17:47:24 +0000 (UTC) Cc: 4533@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 15 18:47:20 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PI39E-0001i6-1i for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Nov 2010 18:47:20 +0100 Original-Received: from localhost ([127.0.0.1]:41030 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PI39D-0003Bq-AH for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Nov 2010 12:47:19 -0500 Original-Received: from [140.186.70.92] (port=44534 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PI36L-0001Pb-Dw for bug-gnu-emacs@gnu.org; Mon, 15 Nov 2010 12:44:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PI369-0001GO-Fr for bug-gnu-emacs@gnu.org; Mon, 15 Nov 2010 12:44:21 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34071) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PI369-0001GJ-Dz for bug-gnu-emacs@gnu.org; Mon, 15 Nov 2010 12:44:09 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PI2li-00017N-CQ; Mon, 15 Nov 2010 12:23:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Nov 2010 17:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 4533 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 4533-submit@debbugs.gnu.org id=B4533.12898417664288 (code B ref 4533); Mon, 15 Nov 2010 17:23:02 +0000 Original-Received: (at 4533) by debbugs.gnu.org; 15 Nov 2010 17:22:46 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PI2lS-000177-4z for submit@debbugs.gnu.org; Mon, 15 Nov 2010 12:22:46 -0500 Original-Received: from pantheon-po41.its.yale.edu ([130.132.50.98]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PI2lP-000171-Ap for 4533@debbugs.gnu.org; Mon, 15 Nov 2010 12:22:43 -0500 Original-Received: from furball (dhcp128036014113.central.yale.edu [128.36.14.113]) (authenticated bits=0) by pantheon-po41.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id oAFHReBq009580 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 15 Nov 2010 12:27:40 -0500 Original-Received: by furball (Postfix, from userid 1000) id 3F8FD1605A6; Mon, 15 Nov 2010 12:27:39 -0500 (EST) In-Reply-To: (Stefan Monnier's message of "Mon, 15 Nov 2010 11:51:36 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 15 Nov 2010 12:23:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:41643 Archived-At: Stefan Monnier 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?