all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ilya N. Golubev" <gin@mo.msk.ru>
Subject: `auto-coding-alist' on remote files
Date: Fri, 31 Oct 2003 19:57:23 +0300	[thread overview]
Message-ID: <02573fa2947261-gin@mo.msk.ru> (raw)

`auto-coding-alist' contains regexps to be matched against names of
files being inserted in buffer.  Since, e. g., `no-conversion' should
be used for any `.tar' files, local or remote, the regexp match should
be done both for local file names and remote ones as processed by
`ange-ftp' or similar package.

So file names being matched should be original ones specified by user
to `find-file' and like, even when the file is remote and its data is
retrieved by file name handler from `ange-ftp'.

Currently this is not the case.  `auto-coding-alist-lookup' gets
called inside `ange-ftp' filename handler on name of temporary file
where `ange-ftp' puts file data retrieved from remote host.  So read
coding is not set properly for remote archive files.

Trying to retain file name suffixes while choosing temporary file
names will help only partially.  The regexps do not have to check
suffixes only, so we never know what particular characteristics of
file name should be retained.

Simply calling `auto-coding-alist-lookup' before
`insert-file-contents' and then setting `coding-system-for-read' may
help or not help.  If `coding-system-for-read' will only be used for
file it was intended for, that is, for (temporary) local file
eventually obtained by file name handlers, it is fine.  But, AFAIK,
nothing forbids file name handler to depend on some additional
(configuration?) data, which are taken from additional files, and
coding system defaults used while reading files may affect that data.

So perhaps the fix is a radical change, involving passing coding
system (already returned by `auto-coding-alist-lookup') to file name
handlers of `insert-file-contents' so that they apply it only to the
file they are inserting, after retrieving its data.

                 reply	other threads:[~2003-10-31 16:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=02573fa2947261-gin@mo.msk.ru \
    --to=gin@mo.msk.ru \
    /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.