0

Similar to Using emacs tramp vs. rsync for remote development but that question doesn't address MS Windows.

Has anyone been able to use rsync instead of plink, either through cygwin or otherwise?

Community
  • 1
  • 1
EoghanM
  • 25,161
  • 23
  • 90
  • 123
  • i would love to have this, but the only way I've ever managed to get it to work is with cygwin. meaning from the shell launching emacs that is distributed with cygwin. it feels clunky to me compared to what you get on linux. but it's the only option I've managed to get to work. – Tom Willis Mar 16 '10 at 18:08

1 Answers1

1

Here is what worked for me with ssh; I just tried replacing ssh with rsync below, and it seemed to work:

NTEmacs can only use cygwin ssh-agent if launched from cygwin bash. This is not a problem; under Windows I currently use the following VB script to launch: WScript.CreateObject("WScript.Shell").Run "c:\cygwin\bin\bash -l -c /usr/bin/emacs", 0, false. For testing, simply symlink your emacs.exe to /usr/bin/emacs (if it's not already set up like that) and launch emacs from cygwin prompt.

This is what’s needed in .emacs

(require 'tramp)
(setq tramp-default-method "ssh")
(nconc (cadr (assq 'tramp-login-args (assoc "ssh" tramp-methods)))  '(("bash" "-i")))
(setcdr (assq 'tramp-remote-sh (assoc "ssh" tramp-methods)) '("bash -i"))
Leo Alekseyev
  • 12,893
  • 5
  • 44
  • 44
  • Cheers - I couldn't get it to work though, using the ssh method I get the following: tramp: Opening connection for user@server.com using nil... tramp: Found remote shell prompt. tramp: Initializing remote shell tramp: Waiting 30s for remote `/bin/sh' to come up... tramp: Setting up remote shell environment apply: Couldn't `stty -inlcr -echo kill '^U'', see buffer `*tramp/plink user@server.com*' – EoghanM Mar 24 '10 at 12:09
  • It still refers to plink in the error message?.. that's strange. I'd try getting it to work with nothing other than those tramp config lines in .emacs, to make sure there's nothing else going on; use (setq tramp-verbose 10) (setq tramp-debug-buffer t) to get more information. I also have (setq tramp-password-end-of-line "\r\n"), but I don't think it's relevant. – Leo Alekseyev Mar 24 '10 at 17:13