[IPython-user] python-mode tab completion problem
Fernando Perez
Fernando.Perez at colorado.edu
Sat Dec 31 17:13:29 CST 2005
Hi John,
John Barnard wrote:
> To get tab completion working with GNU Emacs 23 (I'm using a
> pre-release Cocoa build), I commented out the following three
> lines in the complete method of the IPCompleter class in
> completer.py:
>
> if not self.get_line_buffer().strip():
> self.readline.insert_text('\t')
> return None
>
> Using pdb within IPython (within Emacs), I found that the
> self.get_line_buffer() call was returning the empty string,
> hence, the complete method returned before do any completion
> lookups. This code doesn't seem to serve a crucial function;
> terminal-based ipython runs fine except it now prompts you when
> you hit tab on an empty line -- the commented code gets rid of
> the prompt. Basically, the commented code only works properly
> with readline, which isn't used when running ipython within
> Emacs.
Note that this code was actually added to fulfill a feature request: the
ability to paste tab-indented code _from_ emacs into a normal ipython session.
So I applied a slightly modified version of your change to SVN (also in the
just-released rc5). Please let me know if it works for you.
Also, reports from other GNU Emacs users would be welcome (for me, under
XEmacs all seems OK).
Cheers,
f
More information about the IPython-user
mailing list