Search code examples
pythonemacsautocompleteropemacsrope

Emacs + Rope + Python produces lisp error


I'm trying to use Ropemacs with AutoComplete in Emacs but I keep getting a Debugger error:

Debugger entered--Lisp error: (void-function rope-completions)
  (rope-completions)
  eval((rope-completions))
  eval-last-sexp-1(nil)
  eval-last-sexp(nil)
  call-interactively(eval-last-sexp nil nil)

The symbol rope-completions has no documentation from C-h S. It only appears once, in the auto-complete-config. I've downloaded the latest ropemacs, ropemode, pymacs, python-rope and probably borked any apt system consistency I had.

When I remove this function from the config files auto-complete turns the cursor red when it tries to complete. I can't find reference to this function anywhere on my system.

Auto-complete is working perfectly for me in Lisp. How can I get auto-complete and Rope to work together to give me auto-completion for Python in Emacs?

EDIT: I cannot see the definition of rope-completions through C-h f. Here is the output of my Pymacs buffer:

<23 (version "0.24-beta2")
>45 eval pymacs_load_helper("ropemacs", "rope-")
<278    (return '(progn (pymacs-defuns '(0 rope--OldProgress nil 1 rope--LispProgress nil 2 rope-LispUtils nil 3 rope-message nil 4 rope--lisp-name nil 5 rope--load-ropemacs nil 6 rope--started-from-pymacs nil 7 rope-occurrences-goto "" 8 rope-occurrences-next "")) (pymacs-python 9)))
>45 eval pymacs_load_helper("ropemacs", "rope-")
<288    (return '(progn (pymacs-defuns '(10 rope--OldProgress nil 11 rope--LispProgress nil 12 rope-LispUtils nil 13 rope-message nil 14 rope--lisp-name nil 15 rope--load-ropemacs nil 16 rope--started-from-pymacs nil 17 rope-occurrences-goto "" 18 rope-occurrences-next "")) (pymacs-python 19)))
>51 eval free_python(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 19)
<13 (return nil)
>45 eval pymacs_load_helper("ropemacs", "rope-")
<279    (return '(progn (pymacs-defuns '(19 rope--OldProgress nil 9 rope--LispProgress nil 8 rope-LispUtils nil 7 rope-message nil 6 rope--lisp-name nil 5 rope--load-ropemacs nil 4 rope--started-from-pymacs nil 3 rope-occurrences-goto "" 2 rope-occurrences-next "")) (pymacs-python 1)))

Solution

  • The only way I was able to do it in the end was to ignore all other tutorials and just use the Emacs For Python Github. It works really well, combines a lot of packages that I was looking to use anyway and is easy enough to configure so that it doesn't mess up my existing bindings and settings.