|
|
发表于 2009-5-11 02:52:46
|
显示全部楼层
Post by zhou3345;1985732
刚发现用这种方法启动的emacs server在使用sudo的时候有问题,tramp连接不上,而用emacs-daemon脚本启动可以正常使用。
兄弟在emacs中用sudo么?有此问题吗?
我不用sudo, 但我在tramp里用su/ssh/etc都没问题. 我不知道你说的连接不上是什么意思. 如果是类似假锁现象, 你可以参考
http://www.emacswiki.org/emacs/TrampMode
我用zsh曾经碰到过假锁, 解决方法是在远程机(如果是su, 就是你~root/)的.zshrc中加入- # prompts
- if [[ $TERM == "dumb" ]]; then # in emacs
- PS1='%(?..[%?])%!:%~%# '
- # for tramp to not hang, need the following. cf:
- # http://www.emacswiki.org/emacs/TrampMode
- unsetopt zle
- unsetopt prompt_cr
- unsetopt prompt_subst
- unfunction precmd
- unfunction preexec
- else
- # your own prompt stuff goes here
- fi
复制代码 |
|