简体   繁体   English

emacs,tramp,rsync,MS Windows

[英]emacs, tramp, rsync, MS Windows

Similar to Using emacs tramp vs. rsync for remote development but that question doesn't address MS Windows. 类似于使用emacs tramp vs. rsync进行远程开发,但是该问题无法解决MS Windows。

Has anyone been able to use rsync instead of plink, either through cygwin or otherwise? 有没有人能够通过cygwin或其他方式使用rsync而不是plink?

Here is what worked for me with ssh; 这是ssh对我有用的东西; I just tried replacing ssh with rsync below, and it seemed to work: 我只是尝试在下面用rsync替换ssh,它似乎可以工作:

NTEmacs can only use cygwin ssh-agent if launched from cygwin bash. 如果从cygwin bash启动,NTEmacs只能使用cygwin ssh-agent。 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 . 在Windows下,我当前使用以下VB脚本启动: 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. 为了进行测试,只需将emacs.exe符号链接到/ usr / bin / emacs(如果尚未那样设置),然后从cygwin提示符下启动emacs。

This is what's needed in .emacs 这是.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"))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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