tramp-devel
[Top][All Lists]
Advanced

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

Re: problem of `tramp-handle-file-local-copy' and inline transfer compre


From: Michael Albinus
Subject: Re: problem of `tramp-handle-file-local-copy' and inline transfer compressing
Date: Thu, 22 Apr 2010 17:16:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Toru TSUNEYOSHI <address@hidden> writes:

> Hello, everyone.

Hi,

> Well, while I use tramp, I met a problem. It is that tramp cannot deal
> with file whose name extension is "gz" (maybe "bz2", "zip", and so on)
> in the case of using inline transfer. I found that
> `tramp-handle-file-local-copy' had the problem.
> So I made the patch for it. Please check
> "tramp.el.jka-compr-inhibit.diff". If it is valid, please apply it.
> (tramp-version => "2.1.15" on Emacs 23.1)

The recent Tramp 2.1.18, which is integrated into the upcoming Emacs
23.2, has already changed this (although due to another problem). The
code looks like this:

--8<---------------cut here---------------start------------->8---
--- tramp.el.original   2009-07-08 22:22:51.000000000 +0900
+++ tramp.el    2010-04-22 11:24:19.918277500 +0900
@@ -4095,13 +4095,15 @@
                     v 5 "Decoding remote file %s with function %s..."
                     filename loc-dec)
                    (funcall loc-dec (point-min) (point-max))
-                   (let ((coding-system-for-write 'binary))
+                   (let (file-name-handler-alist
+                         (coding-system-for-write 'binary))
                      (write-region (point-min) (point-max) tmpfile)))
 
                ;; If tramp-decoding-function is not defined for this
                ;; method, we invoke tramp-decoding-command instead.
                (let ((tmpfile2 (tramp-compat-make-temp-file filename)))
-                 (let ((coding-system-for-write 'binary))
+                 (let (file-name-handler-alist
+                       (coding-system-for-write 'binary))
                    (write-region (point-min) (point-max) tmpfile2))
                  (tramp-message
                   v 5 "Decoding remote file %s with command %s..."
--8<---------------cut here---------------end--------------->8---

Could you, please, check, whether it works also for you?

> And, I use `plink' usually. As you know, inline transfer of `plink' is
> very, very slow. (Of course, I sometimes use `pscp' if file size is
> large.)
> So I made `tramp-handle-file-local-copy' and `tramp-handle-write-region'
> enable inline transfer compressing. The speed is approximately 1.5 - 4
> times than the original. (In some cases, approximately 10 times.)
> Please check "tramp.el.jka-compr-inhibit+compress.diff".
> If it is valid, please apply it.

Nice idea. However, Tramp is copylefted by the FSF. As a result,
non-trivial contributions could be accepted only in case the author
(you) has signed the corresponding legal FSF papers. Have you done this
already? Or would you be willing to do?

Thanks, and best regards, Michael.




reply via email to

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