Emacs 23 and iPython

坚强是说给别人听的谎言 提交于 2019-12-02 16:41:54
HörmannHH

I got it working quite well with emacs 23. The only open issue is the focus not returning to the python buffer after sending the buffer to the iPython interpreter.

http://www.emacswiki.org/emacs/PythonMode#toc10

(setq load-path
      (append (list nil
                    "~/.emacs.d/python-mode-1.0/"
            "~/.emacs.d/pymacs/"
            "~/.emacs.d/ropemacs-0.6"
                    )
              load-path))
(setq py-shell-name "ipython")

(defadvice py-execute-buffer (around python-keep-focus activate)
  "return focus to python code buffer"
  (save-excursion ad-do-it))

(setenv "PYMACS_PYTHON" "python2.5") 
(require 'pymacs)

(pymacs-load "ropemacs" "rope-")

(provide 'python-programming)

never used it myself, but I do follow the ipython mailing list, and there was a thread a couple months back.

maybe this will help

http://lists.ipython.scipy.org/pipermail/ipython-user/2008-September/005791.html

It's also a very responsive mailing list if you run into trouble.

I've used ipython with emacs cvs (which has been emacs 23 for some time now) in my python development. I, however, use it the other way around: I call emacs from the ipython promt through the $EDITOR environment variable. I tried it the other way around, but got a bit tired of all the process buffers and what not.

Emacs is great, but a command-line far more versatile.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!