[IPython-user] ipython.el extensions
a.schmolck at gmx.net
Tue Aug 16 09:19:26 CDT 2005
Carlos Pita <carlosjosepita at yahoo.com.ar> writes:
great -- this stuff sounds like it could be a valuable addition to ipython.el
-- I probably won't have time the next couple of days, but I'm definitely
interested to have a look at your code, once you're happy with it, with an eye
for incorporation (provided you like to see your stuff in the official
ipython.el; in which case it will also need to work with xemacs, but I don't
think that should be too hard, with a bit of luck it might work as it is now).
> Hi all!
> I've written a couple of functions enhancing the
> ipython emacs mode. One of them provide autocompletion
> * integration with icicles and icomplete+
> (you complete in the minibuffer, can iterate over
> completions, match by prefix or regex, etc)
Does this play nicely with other enhanced completion modes that people might
use by default (e.g. ido)?
> * the comint interaction with ipython autocompletion
> mechanism simulates normal user interaction
> (instead of sending
> under the hoods:
> - tabs are sent as needed
> - "display all possibilities..." question is answered
> - "--More--" offerts are accepted by sending an space
> This allows ipython to complete the entire line
> instead of just the current indentifier. That is:
> file and ipython magic commands autocompletion are
> working too (fulfilling the desire of the author of this
> ;; 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.).
> Also, the prompt number is maintained instead of being
> annoyingly incremented after each completion.
Interesting -- do you achieve this (e.g. correct prompt numbers) just from
ipython.el by manipulating internal variables of ipython? What kept me from
implementing those things properly so far is that I figured most of it really
ought to be done in the supporting python code, but since relevant parts of
ipython were both terribly convoluted and scheduled to be completely rewritten
I deferred this till the promised internal restructuring.
> The other function provides a simple utility to show
> the documentation corresponding to the current symbol.
> The ipython inferior buffer is "popped up" displaying
> the requested information. This is to facilitate the
> access to documentation while coding inside a
> python-mode buffer. Autocompletion can be used from
> python-mode buffers too (but of course file and magic
> command completion will render useless here).
Weren't there also some efforts in the python-mode project to get some more
intellisense like autocompletion working for python buffers (80% functionality
ought to be fairly easy to achieve; 100% impossible due to the dynamic nature
> I'm still testing this extensions but I find them
> pretty usable and very convenient. I don't know
> if they work with xemacs. If anyone wants
> to give them a chance just email me.
Count me in! (but if you plan to do a bit more testing in the few days, I can
wait till then, thanks to a busy schedule).
More information about the IPython-user