[IPython-user] operate-and-get-next

Fernando Perez fperez.net@gmail....
Tue Jun 3 00:53:03 CDT 2008

Hi Sandro,

On Fri, Jun 1, 2007 at 3:30 AM, Sandro Dentella <sandro@e-den.it> wrote:
> Hi,
>   I have received no feedbck to the question below. Sorry for insisting but
>   I'd like to know if there is some issue why is shouldn't work.
>   Did anybody else ty this? do you get the same behaviour or does it
>   work?
>   Thanks
>   sandro
>   *:-)
> On Sat, May 26, 2007 at 10:21:33AM +0200, Sandro Dentella wrote:
>> Hi,
>>   I'm trying to activare operate-and-get-nextas in the bash with (C-o), by
>>   substituting in ipythonrc:
>> #readline_parse_and_bind "\C-o": tab-insert
>> readline_parse_and_bind "\C-o": operate-and-get-next
>>   but what happens is that C-o changes from inserting a Tab to going at the
>>   beginning of the line, not issuing operate-and-get-next.
>>   Any hints on how to get it done?
>>   [I'm using ipython 0.7.1 on debian sarge with and python 2.4]
>>   thanks in advance
>>   sandro
>>   *:-)
>> >From the bash manual the descruption of this really handy function:
>> operate-and-get-next (C-o)
>>    Accept the current line for execution and fetch the next line relative
>>    to the current line from the history for editing.

I'm very sorry that your question went completely unanswered.  I only
noticed it today when I tried to do a full review of my entire IPython
mail history.  By now you've obviously moved on, but in the interest
of completeness, here's the deal.

As stated here:

The punch line is:

for some reason it is a bash-specific key
binding and is not available in readline itself.

Since this is a bash and not a readline feature, it won't work out of
the box, I'm afraid.  It's conceivable pyreadline could be enhanced to
support it though, but with pure readline it won't be particularly
easy. Feel free to file a feature request for it on the Launchpad bug
tracker if you want, once we have a more abstracted out keyboard event
handling layer it might be feasible to implement this.

Regards, and sorry again for having dropped the ball on your question.


More information about the IPython-user mailing list