Gregor Zattler <[EMAIL PROTECTED]> writes:
>>This message means, that Tramp cannot find a suitable program on the
>>router to encode/decode files. It looks for mimencode, mmencode, recode,
>>perl etc. The traces show also, that stty is not found on the router.
>>
>>Could you, please, check the existence and location of those programs?
>
> You are right, none of the programs are installed on this small
> maschine.
> I skimmed the fine manual and my impression was, that TRAMP
> tries all transfer methods if none is specified. I now specified
> several external transfer methods namely scp and sftp since I know
> that it is possible to transfer files this way:
[...]
> My understanding of the manual was, that the external methods do not
> depend on the encoding programs you mentioned. E.g.: 4.3. External
> transfer methods states: "This saves the overhead of encoding and
> decoding that multiplexing the transfer through the one connection has
> with the inline methods."
>
> Is this a bug in the implementation, the manual or do I simply not
> understand the manual?
In general, your approach is the right one. But there is an optimization
in Tramp, which beats you now: if there is a small file to be copied,
Tramp uses an inline method, even if an external method is specified.
You can customize this behaviour: just set tramp-copy-size-limit to
0. Additionally, you need to apply the appended patch (there was an
error, indeed).
> Thanks for your help,
> Gregor
Best regards, Michael.
*** /home/albinus/src/tramp/lisp/tramp.el.~2.664.~ 2008-11-16 14:49:45.000000000 +0100
--- /home/albinus/src/tramp/lisp/tramp.el 2008-11-19 07:01:01.000000000 +0100
***************
*** 4297,4309 ****
;; `rename-file' handles direct copy and out-of-band methods.
((or (tramp-local-host-p v)
(and (tramp-method-out-of-band-p v)
! (integerp start)
! (> (- end start) tramp-copy-size-limit)))
(rename-file tmpfile filename t))
! ;; Use inline file transfer
(rem-dec
! ;; Encode tmpfile
(tramp-message v 5 "Encoding region...")
(unwind-protect
(with-temp-buffer
--- 4297,4309 ----
;; `rename-file' handles direct copy and out-of-band methods.
((or (tramp-local-host-p v)
(and (tramp-method-out-of-band-p v)
! (> (- (or end (point-max)) (or start (point-min)))
! tramp-copy-size-limit)))
(rename-file tmpfile filename t))
! ;; Use inline file transfer.
(rem-dec
! ;; Encode tmpfile.
(tramp-message v 5 "Encoding region...")
(unwind-protect
(with-temp-buffer
***************
*** 6034,6040 ****
(setq litem (pop local-commands))
(catch 'wont-work-local
(let ((format (nth 0 litem))
! (remote-commands tramp-remote-coding-commands))
(setq loc-enc (nth 1 litem))
(setq loc-dec (nth 2 litem))
;; If the local encoder or decoder is a string, the
--- 6034,6040 ----
(setq litem (pop local-commands))
(catch 'wont-work-local
(let ((format (nth 0 litem))
! (remote-commands nil));tramp-remote-coding-commands))
(setq loc-enc (nth 1 litem))
(setq loc-dec (nth 2 litem))
;; If the local encoder or decoder is a string, the
***************
*** 6108,6118 ****
(setq rem-dec (nth 2 ritem))
(setq found t)))))))
! ;; Did we find something? If not, issue an error.
(unless found
! (kill-process (tramp-get-connection-process vec))
! (tramp-error
! vec 'file-error "Couldn't find an inline transfer encoding"))
;; Set connection properties.
(tramp-message vec 5 "Using local encoding `%s'" loc-enc)
--- 6108,6116 ----
(setq rem-dec (nth 2 ritem))
(setq found t)))))))
! ;; Did we find something?
(unless found
! (tramp-message vec 2 "Couldn't find an inline transfer encoding"))
;; Set connection properties.
(tramp-message vec 5 "Using local encoding `%s'" loc-enc)
***************
*** 7152,7158 ****
(let ((ret (tramp-get-local-coding vec prop)))
;; The connection property might have been cached. So we must send
;; the script - maybe.
! (when (not (stringp ret))
(let ((name (symbol-name ret)))
(while (string-match (regexp-quote "-") name)
(setq name (replace-match "_" nil t name)))
--- 7150,7156 ----
(let ((ret (tramp-get-local-coding vec prop)))
;; The connection property might have been cached. So we must send
;; the script - maybe.
! (when (and ret (symbolp ret))
(let ((name (symbol-name ret)))
(while (string-match (regexp-quote "-") name)
(setq name (replace-match "_" nil t name)))
_______________________________________________
Tramp-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/tramp-devel