【问题标题】:rope-auto-import did not work绳索自动导入不起作用
【发布时间】:2012-11-29 09:34:15
【问题描述】:
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 加载路径(附加 (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,“from shutil import rmtree”没有出现。

相反,我收到消息“找不到全局名称 rmtree!

帮帮我!

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

【问题讨论】:

    标签: python emacs rope ropemacs


    【解决方案1】:
    M-x rope-generate-autoimport-cache
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-03-15
      • 1970-01-01
      • 2012-05-12
      • 2018-03-06
      • 2019-10-06
      • 2023-04-08
      相关资源
      最近更新 更多