elisp - How can I set up two, parallel buffers in emacs to edit Python files in one and execute in an IPython shell in the other? -



elisp - How can I set up two, parallel buffers in emacs to edit Python files in one and execute in an IPython shell in the other? -

i'm trying setup ipython.el in emacs23. i've installed (after putting python-mode.el in load-path supplant python.el comes pre-installed emacs). , can run via m-x py-shell, etc.

the interface seems pretty poorly setup, , wondering if doing wrong, or if need customize create work way i'd like.

in short, workflow i'd have:

in 1 or more buffers, edit python code when nail c-c c-c in buffer, either execute python code in buffer in open ipython shell buffer (if there one) or open buffer that.

but happens right is:

with ipython shell in 1 buffer , python file in other, if nail c-c c-c in python file buffer, file buffer switches ipython buffer (meaning have two, duplicated ipython buffers) , file executed. this annoying.

i'm pretty new elisp, understanding of defadvice advise around python-execute-buffer take note of existing file buffer, run python-execute-buffer, , switch original file buffer workaround.

this seems pretty silly. suggestions improve ways accomplish appreciated!

if matters: i'm on os x 10.6.8 ipython 0.10.1 running emacs 24.0.50.

thanks in advance!

turns out installing python-mode.el , anything-ipython.el , putting

(require 'python-mode) (require 'ipython) (require 'anything-ipython) (add-hook 'python-mode-hook #'(lambda () (define-key py-mode-map (kbd "c-<tab>") 'anything-ipython-complete))) (add-hook 'ipython-shell-hook #'(lambda () (define-key py-mode-map (kbd "c-<tab>") 'anything-ipython-complete)))

in .emacs made work how wanted if py-shell executed before py-execute-buffer (so c-c c-c) executes code in shell instead of opening *python output* buffer.

emacs elisp ipython advising-functions defadvice

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -