我在 OSX 上使用 Emacs 24.4.1(与 Homebrew 一起安装),内置 .python.el
和 Python 3(也与 Homebrew 一起安装),以及 IPython 2.3.0。我有这个.emacs
:
(setq
python-shell-interpreter "/usr/local/bin/ipython3"
python-shell-prompt-regexp "In \\[[0-9]+\\]: "
python-shell-prompt-output-regexp "Out\\[[0-9]+\\]: "
python-shell-completion-setup-code
"from IPython.core.completerlib import module_completion"
python-shell-completion-module-string-code
"';'.join(module_completion('''%s'''))\n"
python-shell-completion-string-code
"';'.join(get_ipython().Completer.all_completions('''%s'''))\n")
当我调用 时,一切正常M-x run-python
,除了一件事:<tab>
模块名称的 -completion 在 REPL 中不起作用(它在*Messages*
缓冲区中显示“不匹配”)。我很确定它可以与我最近升级的 Emacs 24.3 一起使用,但我不能 100% 确定。任何人都知道可能导致这种情况的原因,或者我如何尝试调试它?