[IPython-user] Re: ipython.el + pdb rocks!!!

Alexander Schmolck a.schmolck at gmx.net
Mon Feb 14 23:13:03 CST 2005

Fernando Perez <Fernando.Perez at colorado.edu> writes:

> Finally, is it possible for (x)emacs to complete like ipython does?  ipython
> (as of 0.6.11 or current CVS) completes on python names AND filenames, while
> ipython under xemacs only completes on attributes.  Is this doable/easy?

I'd think so, essentially you'd only have to modify the relevant bit in
ipython accordingly (i.e. the function that ipython.el calls to get its
completions), the corresponding change to ipython.el oughta be minuscule
(caveat: IIRC -- I didn't look into this again. However the comment in
ipython.el's ipython-complete says:

    ;; XXX currently we go backwards to find the beginning of an
    ;; expression part; a more powerful approach in the future might be
    ;; to let ipython have the complete line, so that context can be used
    ;; to do things like filename completion etc.

The reason that I'm not missing filename completion much is that it's handled
conveniently enough by hippie-expand, which I've bound to M-S-Tab:

(if (string-match "XEmacs" emacs-version)
    (global-set-key [(meta iso-left-tab)] 'hippie-expand)
    (global-set-key [(meta shift iso-lefttab)] 'hippie-expand))

But I'd be quite happy to make the required changes to ipython.el if you want
a fancier completion mechanism (unless I'm overlooking/forgetting something
and it amounts to more work than I think; however my current opinion is that
the required changes to both ipython and ipython.el should be rather trivial).


More information about the IPython-user mailing list