all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann)
Cc: eliz@is.elta.co.il, emacs-devel@gnu.org
Subject: Re: Run coding system auto-detection manually?
Date: Tue, 06 Aug 2002 11:48:33 +0200	[thread overview]
Message-ID: <vafofcge2ry.fsf@INBOX.auto.emacs.devel.tok.lucy.cs.uni-dortmund.de> (raw)
In-Reply-To: <200208060150.g761oMF28979@wijiji.santafe.edu> (Richard Stallman's message of "Mon, 5 Aug 2002 19:50:22 -0600 (MDT)")

Richard Stallman <rms@gnu.org> writes:

>     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.
>
> I don't think write-region looks at the LOCKNAME argument in
> deciding which coding system to use.  I think it looks only at
> the FILENAME argument.
>
> Handa, do you think it looks at LOCKNAME?
>
> Is this a bug in the handling of coding systems for precious files?

I'm sorry, I confused LOCKNAME and VISIT.  After looking again in
basic-save-buffer-2, I see the following call:

		       (write-region (point-min) (point-max)
				     tempname nil realname
				     buffer-file-truename)

This is in the "precious" case.  So you can see that the real
filename is in the VISIT argument, not in the LOCKNAME argument.  I
got those two confused before.

Presumably, the intent was that write-region choose the coding system
based on realname instead of tempname.

But looking in the code for write-region, I don't find any evidence
that it looks at VISIT, only at FILENAME, for detecting the coding
system.  Hm.

Maybe in the above call, tempname has been devised in such a way that
choose_write_coding_system chooses the "right" coding.

I'm somewhat confused at the moment.  Can somebody clear up the
confusion?  Is there a bug (regarding VISIT instead of LOCKNAME), as
Richard suggests?  Or does the code work right?

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

  reply	other threads:[~2002-08-06  9:48 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
2002-08-06  1:50     ` Richard Stallman
2002-08-06  9:48       ` Kai Großjohann [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vafofcge2ry.fsf@INBOX.auto.emacs.devel.tok.lucy.cs.uni-dortmund.de \
    --to=kai.grossjohann@cs.uni-dortmund.de \
    --cc=eliz@is.elta.co.il \
    --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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.