luthur
luthur

Reputation: 403

rope-auto-import did not work

virtualenv env
pip install -e git+https://github.com/pinard/[email protected]#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

add following to .emacs (setq virtual-env (getenv "VIRTUAL_ENV")) (setq load-path (append (list (concat virtual-env "/src/pymacs" )) load-path))

(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"))
      ))

after that, i could get code complete, document, definition.

However, after input rmtree, and execute rope-auto-imoport, the "from shutil import rmtree" didn't come.

Instead, i got the Message "Global name rmtree not found!"

Help me!

I have tried the config.py and add the extension_modules and python_path.

Upvotes: 1

Views: 687

Answers (1)

luthur
luthur

Reputation: 403

M-x rope-generate-autoimport-cache

Upvotes: 1

Related Questions