我正在尝试在Emacs中使用Ropemacs和AutoComplete,但我一直收到调试器错误:
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)
符号rope-completions没有来自C-h S的文档.它只出现一次,在auto-complete-config中.我已经下载了最新的ropemacs,ropemode,pymacs,python-rope,并且可能已经完成了我所拥有的任何系统一致性.
当我从配置文件中删除此功能时,auto-complete在尝试完成时将光标变为红色.我无法在我的系统上找到对此功能的引用.
在Lisp中,Auto-complete对我来说非常合适.如何让自动完成和Rope一起工作,让我在Emacs中自动完成Python?
编辑:我无法通过C-h f看到绳索完成的定义.这是我的Pymacs缓冲区的输出:
<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)))
解决方法:
你的emacs设置中有这样的东西吗? (另见:agr / ropemacs / overview — Bitbucket )
(require 'pymacs)
(pymacs-load "ropemacs" "rope-")
如果有,请检查是否有ropemacs命令,例如rope-open-project(C-x p o).
请注意,rope-completions被定义为python函数,因此您不会在elisp源中看到它的定义.
如果正确加载绳索,当你击中C-h f rope-completions RET(不是C-h S)时,你会看到这个.
rope-completions is an interactive Lisp function.
(rope-completions &rest ARGUMENTS)
It interfaces to a Python function.