[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Run coding system auto-detection manually?

From: Kai Großjohann
Subject: Re: Run coding system auto-detection manually?
Date: Mon, 05 Aug 2002 12:43:55 +0200
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.3.50 (i686-pc-linux-gnu)

Eli Zaretskii <address@hidden> writes:

> On Sun, 4 Aug 2002 address@hidden 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.

A large number of young women don't trust men with beards.  (BFBS Radio)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]