tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

insert-file-contents-literally (Re: copy-file problems)


From: Katsumi Yamaoka
Subject: insert-file-contents-literally (Re: copy-file problems)
Date: Wed, 12 Mar 2003 11:45:22 +0900
User-agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3.50 (usg-unix-v)

Hi again,

I found another problem with the auto-compression-mode mode.
A file will be uncompressed contrary to expectation when I use
the following expression:

(insert-file-contents-literally "/address@hidden:~/file.gz")

Here's a patch:

--8<---------------cut here---------------start------------->8---
--- tramp.el~   2003-03-02 14:45:00 +0000
+++ tramp.el    2003-03-12 02:01:32 +0000
@@ -3121,9 +3121,10 @@
          (signal 'file-error
                  (format "File `%s' not found on remote host" filename))
          (list (expand-file-name filename) 0))
-      (let ((local-copy (file-local-copy filename))
-           (coding-system-used nil)
-           (result nil))
+      (let* ((inhibit-file-name-operation 'file-local-copy)
+            (local-copy (file-local-copy filename))
+            (coding-system-used nil)
+            (result nil))
        (when visit
          (setq buffer-file-name filename)
          (set-visited-file-modtime)
--8<---------------cut here---------------end--------------->8---

P.S. Under XEmacs, the insert-file-contents-literally function
won't work with Tramp, since it binds the file-name-handler-alist
to nil. :-<
-- 
Katsumi Yamaoka <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]