unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann)
Cc: emacs-devel@gnu.org
Subject: Re: Run coding system auto-detection manually?
Date: Mon, 05 Aug 2002 12:43:55 +0200	[thread overview]
Message-ID: <vafr8hdio0k.fsf@INBOX.auto.emacs.devel.tok.lucy.cs.uni-dortmund.de> (raw)
In-Reply-To: <Pine.SUN.3.91.1020805074633.25320B@is> (Eli Zaretskii's message of "Mon, 5 Aug 2002 07:48:03 +0300 (IDT)")

Eli Zaretskii <eliz@is.elta.co.il> 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)

  reply	other threads:[~2002-08-05 10:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-04 14:22 Run coding system auto-detection manually? Kai Großjohann
2002-08-05  4:48 ` Eli Zaretskii
2002-08-05 10:43   ` Kai Großjohann [this message]
2002-08-06  1:50     ` Richard Stallman
2002-08-06  9:48       ` Kai Großjohann
2002-08-07 14:23         ` Richard Stallman
2002-08-06  9:50 ` Kai Großjohann
2002-08-07  8:24   ` Kenichi Handa
2002-08-07 15:18     ` Kai Großjohann
2002-08-08  1:09       ` Kenichi Handa
2002-08-08  7:01     ` Richard Stallman
2002-08-08  8:48       ` Kai Großjohann
2002-08-08 12:45       ` Kenichi Handa
2002-08-08 13:12         ` Kai Großjohann

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=vafr8hdio0k.fsf@INBOX.auto.emacs.devel.tok.lucy.cs.uni-dortmund.de \
    --to=kai.grossjohann@cs.uni-dortmund.de \
    --cc=emacs-devel@gnu.org \
    /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).