我正在尝试让emacs tramp在Windows XP下运行,以便在亚马逊EC2实例上运行putty plink。这样做的文档是稀疏的。我可以找到部分文档,但没有一个文档涉及到使其正常工作所需的所有步骤。
有没有人能提供一个遍历,或者一个指向遍历的指针?
发布于 2009-07-10 16:20:56
(add-to-list 'load-path
(expand-file-name "C:/tools/emacsw32/emacs/lisp/tramp/lisp"))
(require 'tramp)
;(setq tramp-chunksize "500")
(setq tramp-default-method "plink")从我的.-emacs文件中。如果我找到更多的注释,我会在这里添加它们。
发布于 2015-03-08 11:41:18
我假设您有一个想要访问的GNU/Linux服务器、一个用户名和一个.ppk文件。还有Emacs 24.4+。
首先在PuTTY配置中设置服务器
username@server。putty-test,然后单击保存按钮。接下来,转到您的Emacs。
plink.exe在哪里。一种方法是直接在您的.emacs中通知Emacs,例如,我现在有一个类型为C-x C-f //plink:putty-test:/ RET的Emacs。等待连接,window将打开远程~/目录上的dired缓冲区。发布于 2019-08-27 13:42:21
这对我来说很有效:
在https://sourceforge.net/projects/emacsbinw64/files/release/.
与原始tramp-sh.el相比的更改是
对于cygwin,请将fakecygpty与ssh一起使用,并将提示符更改为##
-ssh 我还用w对这些方法进行了重命名,以区分它们。
(when (string-equal system-type "windows-nt")
(add-to-list 'tramp-methods
`("sshw"
(tramp-login-program "fakecygpty ssh")
;; ("%h") must be a single element, see `tramp-compute-multi-hops'.
(tramp-login-args (("-l" "%u" "-o \"StrictHostKeyChecking=no\"") ("-P" "%p") ("-t")
("%h") ("\"")
(,(format
"env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'"
tramp-terminal-type
"##"))
("/bin/sh") ("\"")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-default-port 22))
)
(add-to-list 'tramp-methods
`("plinkw"
(tramp-login-program "plink")
;; ("%h") must be a single element, see `tramp-compute-multi-hops'.
(tramp-login-args (("-l" "%u") ("-P" "%p") ("-t")
("%h") ("\"")
(,(format
"env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'"
tramp-terminal-type
"$"))
("/bin/sh") ("\"")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-default-port 22))
)
)https://stackoverflow.com/questions/1095172
复制相似问题