rope-auto-import不起作用

时间:2012-11-29 09:34:15

标签: python emacs rope ropemacs

virtualenv env
pip install -e git+https://github.com/pinard/Pymacs.git@v0.24-beta2#egg=Pymacs-dev
pip install -e hg+https://bitbucket.org/agr/rope#egg=rope-dev
pip install -e hg+https://bitbucket.org/agr/ropemacs#egg=ropemacs-trunk
pip install -e hg+https://bitbucket.org/agr/ropemode#egg=ropemode-trunk
cd env/src/pymacs
make install

将以下内容添加到.emacs中     (setq virtual-env(getenv“VIRTUAL_ENV”))     (setq load-path(追加                      (list(concat virtual-env“/ src / pymacs”))                      负载路径))

(if (not (equal virtual-env 'nil))
    (let ((foo 'bar))
      (require 'pymacs)
      (pymacs-load "ropemacs" "rope-")
      (setq ropemacs-enable-autoimport 't)
      (setq ropemacs-autoimport-modules '("os" "shutil"))
      ))

之后,我可以获得代码完整,文档,定义。

然而,输入rmtree后,执行rope-auto-imoport,“来自shutil import rmtree”没有来。

相反,我收到消息“全局名称rmtree not found!

帮助我!

我已经尝试了config.py并添加了extension_modules和python_path。

1 个答案:

答案 0 :(得分:1)

M-x rope-generate-autoimport-cache