Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ensures that ipython-complete is called.

python-mode defines a key-binding for the tab key for its own
completion function (py-shell-complete) if that one wins, then
py-shell-complete will hang emacs as it tries to communicate
with the python shell process which does not exist. This uses
def-advice to instead call ipython-complete when py-shell-complete
is called.
  • Loading branch information...
commit 4a983cae2f36d96ae60eb0f0413912d524ad65d7 1 parent f54e9e3
@paykroyd authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 docs/emacs/ipython.el
View
8 docs/emacs/ipython.el
@@ -423,6 +423,14 @@ in the current *Python* session."
(message "Making completion list...%s" "done")))))
)
+;;; if python-mode's keybinding for the tab key wins then py-shell-complete is called
+;;; instead of ipython-complete which result in hanging emacs since there is no shell
+;;; process for python-mode to communicate with
+(defadvice py-shell-complete
+ (around avoid-py-shell-complete activate)
+ (ipython-complete))
+
+
;;; autoindent support: patch sent in by Jin Liu <m.liu.jin@gmail.com>,
;;; originally written by doxgen@newsmth.net
;;; Minor modifications by fperez for xemacs compatibility.

1 comment on commit 4a983ca

@andreas-roehler

Hi,

if these kind of things happen, please alert us at
http://launchpad.net/python-mode
Let's prevent the evil at it's source :)

Cheers,
Andreas

Please sign in to comment.
Something went wrong with that request. Please try again.