简体   繁体   中英

emacs, tramp, rsync, MS Windows

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?

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"))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM