[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Tramp and auto-compression-mode and load order
From: |
Kai Großjohann |
Subject: |
Tramp and auto-compression-mode and load order |
Date: |
Wed, 21 Nov 2001 12:04:12 +0100 |
User-agent: |
Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1.50 (i686-pc-linux-gnu) |
Tramp is similar to ange-ftp, but transfers the files through a shell
connection (base64 encoded via mimencode or uuencoded), rather than
via ftp. It can also do the file transfer via scp or a similar program.
It works to load Tramp first, then turn on auto-compression-mode
later. But it does not work to turn on auto-compression-mode first,
then load Tramp.
This appears to be because of the order of entries in
file-name-handler-alist.
In Tramp, insert-file-contents is implemented by using some mechanism
to fetch the remote file to a local temp file (for example, by running
scp), then insert-file-contents is invoked on the local temp file.
I have done a check: if the filename ends with ".gz", then I make
sure that the local temp file name also ends with ".gz". Then,
insert-file-contents on the local temp file will do the right thing:
auto-compression-mode kicks in and unzips the file.
Have you got any advice on what could be done so that Tramp works
even if it is loaded after auto-compression-mode has been turned on?
(Clearly, frobbing the name of the temp file is the wrong way to
approach this. I only did it to find out what's going on.)
kai
--
Simplification good! Oversimplification bad! (Larry Wall)