2011-11-22 33 views
7

有没有人设法得到Emacs 23,python-mode.el和ipython.el最近一起工作?Ipython Emacs集成

我的.emacs看起来是这样的:

(add-to-list 'load-path "~/.emacs.d/python-mode.el-6.0.3/") 
(require 'python-mode) 
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode)) 
(require 'ipython) 

我越来越对C-c !错误是:

Traceback (most recent call last): 
    File "<string>", line 1, in <module> 
NameError: name 'olors' is not defined 
+0

--colors更换的-colors所有情况下你可能想看看这个:http://stackoverflow.com/questions/304049/emacs-23-and-ipython和内容:HTTP:// www.emacswiki.org/emacs/PythonProgrammingInEmacs#toc11 –

+4

这些链接现在已经有几年了 - 我在发布前阅读它们。我认为我遇到的问题与更新的版本有关(由github上的一些线程判断) – bph

回答

7

ipython.el被称为是过时的。核心IPython开发人员都不知道emacs lisp。有人现在working to fix it - 如果你有时间,请测试他的分支并报告它是否有效。

9

这里的另一个原因有人会收到此错误:如果给定 - 颜色ARG

IPython的0.12退出并显示错误。

什么固定它,我在我的.emacs与

(setq py-python-command-args '("--colors=linux")) 

也就是说,确保传递到IPython中的基本名字有效替代

(setq py-python-command-args '("-colors" "Linux")) 

。如果不是,iPython会退出,并返回到常规Python解释器。

2

我从Emacs23调用IPython时有同样的错误。我固定它通过ipython.el