3

How do I set up auto-complete to use ropemacs with python.el in Emacs 24?

I have the following in my .emacs file

; Auto-complete:
; --------------------------
(add-to-list 'load-path "~/.emacs.d/auto-complete/auto-complete-1.3.1")
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/auto-complete/auto-complete-1.3.1/dict")
(ac-config-default)

; Auto-complete rope integration:
; --------------------------
(ac-ropemacs-initialize)
(add-hook 'python-mode-hook
      (lambda ()
    (add-to-list 'ac-sources 'ac-source-ropemacs)))

but this does not seem to be enough to get autocompletions of Python methods, class members, etc. (on the auto-complete tooltip).

e.g.

my_text = "hello world"
my_text.

does not show any possible autocompletions for the String class.

With the above config, auto-complete itself works well for generic auto-completions (and for directories).

1 Answer 1

6

If I may suggest, try emacs-jedi if you just want auto completion, and documentation help.

It is relatively new and in early development stage matured and reliable enough to work with, way better than the rope route.

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks! Why is it a better route than rope? What are the differences?
@user273158 two reasons, 1) Its specifically written for auto-completion support for python, a wrapper to jedi (github.com/davidhalter/jedi). 2) the author of the package is super active.
I fully agree; I was trying ropemacs after hours of setting up, and it was awfully slow, so after seeing this I tried emacs-jedi and everything is just pure awesome now.
agreed. never could get ropemacs set up. I tried for an entire 8 hour workday. Sorry ropemacs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.