git - 如何使emacs + egg(git)与远程文件一起工作(通过ssh访问)

标签 git emacs ssh tramp sshfs

访问本地系统中的repos / dirs / files时,我的emacs + egg可以正常工作。

另外,通过ssh打开和编辑文件也可以,例如

ctrl-f /ssh:jds@dev.acme.com:/home/jds/src/test.py

但是当执行egg-status时,我得到...
Opening input file: no such file or directory, /HEAD

请注意,如果我打开 shell 程序并通过ssh进入远程系统,则所有git命令均能正常工作。

感谢您的帮助,以使其正常工作。

最佳答案

我同意Alex's answer的建议,您应该使用更高级,更强大的magit package

关于egg为什么无法按照您想要的方式工作的更长的故事是:卵的编写方式无法在带有TRAMP的远程文件上运行,因为egg.el使用call-process函数,而magit使用start-file-process,如描述的那样受支持。 Remote Processes section of the TRAMP manual:

5.4 Integration with other Emacs packages.

tramp supports running processes on a remote host. This allows to
exploit Emacs packages without modification for remote file names.
[...]
process-file and start-file-process work on the remote host when the
variable default-directory is remote:

     (let ((default-directory "/ssh:remote.host:"))
       (start-file-process "grep" (get-buffer-create "*grep*")
                           "/bin/sh" "-c" "grep -e tramp *"))

关于git - 如何使emacs + egg(git)与远程文件一起工作(通过ssh访问),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13882532/

相关文章:

node.js - Nodejs OPENSSH - 错误 : read ECONNRESET at TCP. onStreamRead

linux - "syntax error: unexpected end of file"使用 ssh

linux - 如何通过用户通过 ssh 发送的公钥获取用户信息?

bash - git log 和 git rev-list 的不同结果

git - 从 Github 服务器导出 ssh key

emacs - Emacs中如何构建函数关联表?

scala 模式下的 Emacs 换行和缩进

linux - Git:如何在不充斥无关紧要的提交的情况下共享存储库?

git - 如何使用 .gitignore 仅跟踪特定文件?

emacs - ctrl-x o 向后(与其他窗口相反)?