From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: revert-buffer and changes in encoding Date: Mon, 29 Nov 2004 01:12:45 -0500 Message-ID: Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1101709075 6086 80.91.229.6 (29 Nov 2004 06:17:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 29 Nov 2004 06:17:55 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 29 07:17:51 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CYer8-0007jE-00 for ; Mon, 29 Nov 2004 07:17:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYf0W-0006iP-Pg for ged-emacs-devel@m.gmane.org; Mon, 29 Nov 2004 01:27:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CYeyA-00056k-CU for emacs-devel@gnu.org; Mon, 29 Nov 2004 01:25:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CYey6-000561-Pv for emacs-devel@gnu.org; Mon, 29 Nov 2004 01:25:03 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYey6-00055o-Fz for emacs-devel@gnu.org; Mon, 29 Nov 2004 01:25:02 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CYeoe-0000MD-4t for emacs-devel@gnu.org; Mon, 29 Nov 2004 01:15:17 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1CYemD-0002Vi-SL; Mon, 29 Nov 2004 01:12:45 -0500 Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:30479 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30479 We have had discussions in the past about how revert-buffer should deal with encoding. I think this statement, by Stefan, is the right thing to do: Looks like we should remember whether the current coding-system was automatically inferred or whether it was explicitly specified. Of course, we need to remember it separatly for the line-ending part of the coding-system. If the file was originally visited with a specified coding system, revert-buffer should keep on using that specified coding system. If the file coding system was autodetected before, revert-buffer should autodetect it again, and it should set buffer-file-coding-system again so that saving the buffer uses the most recent coding system. Setting this flag to record whether the coding system was explicitly specified is easy to do in Finsert_buffer. It should only set this flag when the VISIT argument specifies visiting a file. Can someone please implement this, and ack to me?