From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-15?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.devel Subject: Re: Run coding system auto-detection manually? Date: Mon, 05 Aug 2002 12:43:55 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1028544276 9523 127.0.0.1 (5 Aug 2002 10:44:36 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 5 Aug 2002 10:44:36 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17bfLn-0002TU-00 for ; Mon, 05 Aug 2002 12:44:35 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17bfgN-0004YQ-00 for ; Mon, 05 Aug 2002 13:05:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17bfMF-0000yb-00; Mon, 05 Aug 2002 06:45:03 -0400 Original-Received: from waldorf.cs.uni-dortmund.de ([129.217.4.42]) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17bfLM-0000wM-00 for ; Mon, 05 Aug 2002 06:44:08 -0400 Original-Received: from lothlorien.cs.uni-dortmund.de (lothlorien [129.217.19.67]) by waldorf.cs.uni-dortmund.de with ESMTP id g75Ai1b23240; Mon, 5 Aug 2002 12:44:01 +0200 (MES) Original-Received: from lucy.cs.uni-dortmund.de (lucy [129.217.19.80]) by lothlorien.cs.uni-dortmund.de id MAA09531; Mon, 5 Aug 2002 12:43:55 +0200 (MET DST) Original-Received: by lucy.cs.uni-dortmund.de (Postfix, from userid 6104) id 95BBD3ADDC; Mon, 5 Aug 2002 12:43:55 +0200 (CEST) Original-To: Eli Zaretskii In-Reply-To: (Eli Zaretskii's message of "Mon, 5 Aug 2002 07:48:03 +0300 (IDT)") Original-Lines: 30 User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.3.50 (i686-pc-linux-gnu) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:6293 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:6293 Eli Zaretskii writes: > On Sun, 4 Aug 2002 Kai.Grossjohann@CS.Uni-Dortmund.DE wrote: > >> But I would like to use write-region to write the buffer contents to >> another file, but I would like this call to use the same coding >> system that Emacs would have used for C-x C-s. > > Perhaps this means that the place where "C-x C-s" computes the encoding > is not the right one. Perhaps there should be a function that does that > and calls write-region, and "C-x C-s" should call that function. I think I found the answer. Are the following correct? When the file is precious, Emacs already writes to a different file first and then renames the file. Therefore, the spot where Emacs invokes write-region if the file is precious must already take care of this. At that spot, (the function called from) save-buffer just passes the real file name as the LOCKNAME argument. Therefore it is sufficient to pass the right filename as the LOCKNAME argument and lookup in file-coding-system-alist and so on will use that argument. If this is really true, the documentation for write-region should be updated to reflect this. I can do that if you like. kai -- A large number of young women don't trust men with beards. (BFBS Radio)