Car*_*age 15 windows emacs tramp
24.2运行良好,但24.3 bounded tramp在打开远程Linux系统文件或目录时出现以下错误:
"byte-code: Couldn't find a proper `ls' command"
Run Code Online (Sandbox Code Playgroud)
我打开tramp trace并发现,所有远程搜索路径和文件路径都是通过某种东西扩展,在开头添加一个额外的"c:".结果是tramp既没有找到我要打开的命令也没有找到文件.
16:04:51.768000 tramp-get-connection-property (7) # process-buffer nil
16:04:51.769000 tramp-set-file-property (8) # c:/bin file-directory-p nil
16:04:51.770000 tramp-get-file-property (8) # c:/usr/bin file-directory-p undef
...
16:04:59.531000 tramp-sh-handle-file-truename (5) # Check /c:
16:04:59.532000 tramp-get-file-property (8) # c:/c: file-attributes-integer undef
...
16:04:51.773000 tramp-get-connection-property (7) # process-name nil
16:04:51.773000 tramp-get-connection-property (7) # chunksize 0
16:04:51.773000 tramp-set-connection-property (7) # last-cmd-time (20809 28067 773000 0)
16:04:51.774000 tramp-send-string (10) # test -d c\:/usr/bin 2>/dev/null; echo tramp_exit_status $?
Run Code Online (Sandbox Code Playgroud)
有人知道这个吗?提前致谢.
fek*_*lee 18
合并@AlanThird的答案和@uscjeremy的评论,这对我有用(2013-03-17的GNU Emacs 24.3.1(i386-mingw-nt5.1.2600),关于MARVIN,Windows XP/SP3/32) :
字节编译tramp-sh.el(相应地调整路径):
(byte-compile-file "C:/Program Files (X86)/emacs/lisp/net/tramp-sh.el")
Run Code Online (Sandbox Code Playgroud)退出Emacs.
删除Tramp缓存: ~/.emacs.d/tramp
启动Emacs.
另请参阅gnu.org上的错误报告#14030.
看来这是tramp中的一个bug,但是你不需要升级tramp,所有你需要做的就是在Windows机器上重新编译tramp-sh.el.有关详细信息,请参阅此处的错误报告.
在暂存缓冲区中输入:
(byte-compile-file "C:/Program Files/emacs/lisp/net/tramp-sh.el")
Run Code Online (Sandbox Code Playgroud)
调整路径以匹配您的安装,然后键入Ctrl-Meta-x以重新编译该文件.如果它抱怨权限,您可能需要使用Windows中的"以管理员身份运行"选项重新启动emacs.
重新编译文件后,键入M-x tramp-cleanup-all-connections以重置tramp连接缓存.这将关闭您打开的所有tramp连接.
切换到 Emacs 24.3 后我遇到了同样的问题。解决方案是升级到最新的 TRAMP 2.2.7。这是我所做的:
执行 Mx ranp-version 以确保其安装正确。现在,tramp 可以在任何地方使用(dired、eshell、shell 等)。
| 归档时间: |
|
| 查看次数: |
5398 次 |
| 最近记录: |