tramp-devel
[Top][All Lists]
Advanced

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

Re: Getting TRAMP 2.0.25 working in NT Emacs 21.2.1 with Cygwin 1.3.12-1


From: Francis Litterio
Subject: Re: Getting TRAMP 2.0.25 working in NT Emacs 21.2.1 with Cygwin 1.3.12-1
Date: Wed, 09 Oct 2002 15:30:49 -0400
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i386-msvc-nt5.0.2195)

address@hidden (Kai Großjohann) writes:

> I'm short on time; would you like to submit a patch for this where
> the variable defaults to nil (meaning use whatever
> tramp-temporary-file-directory returns now)?  Then we can still talk
> about a better default value for the variable.

After adding a kludge variable named tramp-temp-dir and trying to make
it work, I realized that it is almost impossible to come up with a value
for it that refers to the same directory in both Cygwin and NT Emacs
without using a drive-letter prefix (e.g., "c:/temp").  And of course
hiding the drive-letter prefix from scp is the whole point.  Hacks
involving Cygwin symlinks or mounts would still be necessary.

Given that the misbehavior is in Cygwin's scp and not in NT Emacs or
TRAMP, I'm now convinced that NT Emacs users who wish to use the "scpx"
external transfer method should write a wrapper script named
"scpwrapper" that transforms NT Emacs pathnames into Cygwin-style
pathname before invoking the real scp (like this):

        #!/usr/bin/perl -w
        unshift @ARGV, "/usr/bin/scp";
        $ARGV[-1] =~ s|^c:|/cygdrive/c|;
        exec @ARGV;

and should configure tramp-methods to use this script instead of
Cygwin's scp:

  (setq tramp-default-method "scpx")
  (let ((method (cdr (assoc "scpx" tramp-methods))))
    (setcdr (assoc 'tramp-rcp-program method) '("perl"))
    (setcdr (assoc 'tramp-rcp-args method) '(("c:/path/to/scpwrapper"))))

I've tested this very configuration using Cygwin, NT Emacs, and a remote
Linux machine, and it works without any changes to TRAMP.

I'm sorry for the wasted bandwidth regarding this whole temporary
directory thing, but I really wanted to get TRAMP, NT Emacs, and
Cygwin's scp to play together.
--
Francis Litterio
address@hidden
http://world.std.com/~franl/
GPG and PGP public keys available on keyservers.





reply via email to

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