Question

When I run IPython inside emacs in textmode (i.e. inside a terminal), I don't get any tab completion. Rather than given tab completion it jumps four spaces.

When I run emacs in normal GUI mode there is fine tab completion.

Is there a way to fix that for text mode?

I'm using Linux Mint 15, Emacs 24.3 and IPython 1.1.0

Was it helpful?

Solution

Try this:

(eval-after-load "python"
  '(define-key inferior-python-mode-map "\t" 'python-shell-completion-complete-or-indent)

If this works for you, you may have a misconfiguration problem that is preventing python mode to load correctly in your setup.

OTHER TIPS

I recently encountered the same problem and after some search I found that this problem is caused by the difference between <tab> and TAB. The Emacs wiki has a page describes the difference: http://www.emacswiki.org/emacs/TabKey .

In my python.el, the python-shell-completion-complete-or-indent is bind to <tab> which works fine for GUI but not for CLI. Change the binding to TAB will fix this problem.

Start IPython not from pure shell, but from a python-mode.

I.e. M-x run-python RET with shipped python.el, having customized python-shell-interpreter accordingly.

Resp. M-x IPython RET with python-mode.el

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top