all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* `auto-coding-alist' on remote files
@ 2003-10-31 16:57 Ilya N. Golubev
  0 siblings, 0 replies; only message in thread
From: Ilya N. Golubev @ 2003-10-31 16:57 UTC (permalink / 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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-10-31 16:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-31 16:57 `auto-coding-alist' on remote files Ilya N. Golubev

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.