4 ms·
It's actually quite easy, as it comes pretty much out of the box with recent versions of Emacs (24+) and python.el (not to be confused with the older python-mod
by cjauvin 9y ago
It's actually quite easy, as it comes pretty much out of the box with recent versions of Emacs (24+) and python.el (not to be confused with the older python-mode.el). I could not find a nice web source for python.el's documentation, but it turns out that directly reading its code is not so bad in this case:
https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/python.el https://github.com/emacs-mirror/emacs/blob/master/lisp/progm...
In particular, you need to set the `python-shell-interpreter` variable to "ipython" (which must be in your path preferably). You can then invoke `run-python` to start a REPL, and C-c C-c to send a buffer to it.
There are a couple more interesting commands with this mode, see:
https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/python.el#L323-L329 https://github.com/emacs-mirror/emacs/blob/master/lisp/progm...