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...
1 parent f54e9e3 commit 4a983cae2f36d96ae60eb0f0413912d524ad65d7 @paykroyd committed Nov 19, 2011
Showing with 8 additions and 0 deletions.
  1. +8 −0 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 <>,
;;; originally written by
;;; Minor modifications by fperez for xemacs compatibility.

1 comment on commit 4a983ca


if these kind of things happen, please alert us at
Let's prevent the evil at it's source :)


Please sign in to comment.