ipython completion has stopped working

Bug #973844 reported by Richard Stanton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Fix Released
High
Andreas Roehler

Bug Description

Using ipython as my shell, I was always (until recently) able to get ipython completion to work very nicely by pressing TAB. Now (r918, but I'm not sure when this started) here's what happens on my Mac:

1) Open ipython buffer by pressing C-c !. An ipython buffer opens up call *ND 0.12* (no idea what this name means, but it doesn't seem important).

2) Type

In [2]: import numpy

In [3]: numpy.ar [TAB]

In the past, this would pop up another buffer showing possible completions for numpy.ar. Now, however,

a. The ipython buffer disappears completely, leaving the cursor in an empty buffer called *IPython-54466Vru*

b. The other half of the window shows another new buffer called *IPython-54466i10*, in which I see

---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/Users/stanton/projects/altbzr/trunk/<ipython-input-1-96e127548189> in <module>()
----> 1 print(';'.join(__IP.Completer.all_completions('numpy.ar'))) #PYTHON-MODE SILENT

NameError: name '__IP' is not defined

In [2]:

Not quite as useful as before...

Changed in python-mode:
importance: Undecided → High
assignee: nobody → Andreas Roehler (a-roehler)
milestone: none → 6.0.6
Revision history for this message
Andreas Roehler (a-roehler) wrote :

please flag "new" again, if not done

Changed in python-mode:
status: New → Fix Committed
Revision history for this message
Richard Stanton (a-stanton) wrote :

r919: Same symptoms.

Changed in python-mode:
status: Fix Committed → New
Revision history for this message
Andreas Roehler (a-roehler) wrote : Re: [Bug 973844] [NEW] ipython completion has stopped working

Am 05.04.2012 01:29, schrieb Richard Stanton:
> Public bug reported:
>
> Using ipython as my shell, I was always (until recently) able to get
> ipython completion to work very nicely by pressing TAB. Now (r918, but
> I'm not sure when this started) here's what happens on my Mac:
>
> 1) Open ipython buffer by pressing C-c !. An ipython buffer opens up
> call *ND 0.12* (no idea what this name means, but it doesn't seem
> important).
>

ND means non-default,

the question is how to indicate a non-default Python is used.

Alternative that might be some acronym constructed from path

Changed in python-mode:
status: New → In Progress
Revision history for this message
Richard Stanton (a-stanton) wrote :

>>
>>Using ipython as my shell, I was always (until recently) able to get
>> ipython completion to work very nicely by pressing TAB. Now (r918, but
>> I'm not sure when this started) here's what happens on my Mac:
>>
>> 1) Open ipython buffer by pressing C-c !. An ipython buffer opens up
>> call *ND 0.12* (no idea what this name means, but it doesn't seem
>> important).
>>
>
>ND means non-default,

When I press C-c !, isn't this opening a *default* python shell?

Revision history for this message
Andreas Roehler (a-roehler) wrote :

Am 06.04.2012 18:29, schrieb Richard Stanton:
>>>
>>> Using ipython as my shell, I was always (until recently) able to get
>>> ipython completion to work very nicely by pressing TAB. Now (r918, but
>>> I'm not sure when this started) here's what happens on my Mac:
>>>
>>> 1) Open ipython buffer by pressing C-c !. An ipython buffer opens up
>>> call *ND 0.12* (no idea what this name means, but it doesn't seem
>>> important).
>>>
>>
>> ND means non-default,
>
>
> When I press C-c !, isn't this opening a *default* python shell?
>

it should, i.e. ND should not appear than

Revision history for this message
Andreas Roehler (a-roehler) wrote :

Am 06.04.2012 18:29, schrieb Richard Stanton:
>>>
>>> Using ipython as my shell, I was always (until recently) able to get
>>> ipython completion to work very nicely by pressing TAB. Now (r918, but
>>> I'm not sure when this started) here's what happens on my Mac:
>>>
>>> 1) Open ipython buffer by pressing C-c !. An ipython buffer opens up
>>> call *ND 0.12* (no idea what this name means, but it doesn't seem
>>> important).
>>>
>>
>> ND means non-default,
>
>
> When I press C-c !, isn't this opening a *default* python shell?
>

correcting my previous answer

ND means not system-shell.
if py-shell-name is a path, than ND appears.

probably it should read Not-System, resp. the path-acronym better yet

Revision history for this message
Andreas Roehler (a-roehler) wrote :

please try again, thx

Changed in python-mode:
status: In Progress → Fix Committed
Revision history for this message
Richard Stanton (a-stanton) wrote : Re: [Bug 973844] Re: ipython completion has stopped working

The cursor stays where it was and I don't get the strangely named new
buffers, but the completion still doesn't work. I just get the message

Can't find completion for "numpy.ar"

On 4/6/12 11:43 AM, "Andreas Roehler" <email address hidden> wrote:

>please try again, thx
>
>** Changed in: python-mode
> Status: In Progress => Fix Committed
>
>--
>You received this bug notification because you are subscribed to the bug
>report.
>https://bugs.launchpad.net/bugs/973844
>
>Title:
> ipython completion has stopped working
>
>Status in An Emacs mode for editing Python code:
> Fix Committed
>
>Bug description:
> Using ipython as my shell, I was always (until recently) able to get
> ipython completion to work very nicely by pressing TAB. Now (r918, but
> I'm not sure when this started) here's what happens on my Mac:
>
> 1) Open ipython buffer by pressing C-c !. An ipython buffer opens up
> call *ND 0.12* (no idea what this name means, but it doesn't seem
> important).
>
> 2) Type
>
> In [2]: import numpy
>
> In [3]: numpy.ar [TAB]
>
> In the past, this would pop up another buffer showing possible
> completions for numpy.ar. Now, however,
>
> a. The ipython buffer disappears completely, leaving the cursor in an
> empty buffer called *IPython-54466Vru*
>
> b. The other half of the window shows another new buffer called
> *IPython-54466i10*, in which I see
>
>
>--------------------------------------------------------------------------
>-
> NameError Traceback (most recent call
>last)
> /Users/stanton/projects/altbzr/trunk/<ipython-input-1-96e127548189> in
><module>()
> ----> 1 print(';'.join(__IP.Completer.all_completions('numpy.ar')))
>#PYTHON-MODE SILENT
>
> NameError: name '__IP' is not defined
>
> In [2]:
>
> Not quite as useful as before...
>
>To manage notifications about this bug go to:
>https://bugs.launchpad.net/python-mode/+bug/973844/+subscriptions

Changed in python-mode:
status: Fix Committed → In Progress
Revision history for this message
Richard Stanton (a-stanton) wrote :

> The cursor stays where it was and I don't get the strangely named new
> buffers, but the completion still doesn't work. I just get the message
> Can't find completion for "numpy.ar"

More information: If I try to complete "ex", it works fine, giving me a
buffer with a selection of words beginning with "ex". However, it fails if
I try to complete "numpy.ar", and I think I know why. My main python
buffer is called *ND 0.12*. When I press Tab, a new python buffer is
created, called *Ipython*. I assume this is where the completion is
performed, but the problem is that numpy was imported in *my* python
buffer, so trying to complete numpy symbols in a new python buffer isn't
going to work.

If the current buffer is already an ipython buffer, there's no reason to
open a new one for completion. Just use the one that's already open.

Revision history for this message
Andreas Roehler (a-roehler) wrote :

Am 06.04.2012 21:16, schrieb Richard Stanton:
>> The cursor stays where it was and I don't get the strangely named new
>> buffers, but the completion still doesn't work. I just get the message
>> Can't find completion for "numpy.ar"
>
>
> More information: If I try to complete "ex", it works fine, giving me a
> buffer with a selection of words beginning with "ex". However, it fails if
> I try to complete "numpy.ar", and I think I know why. My main python
> buffer is called *ND 0.12*. When I press Tab, a new python buffer is
> created, called *Ipython*. I assume this is where the completion is
> performed, but the problem is that numpy was imported in *my* python
> buffer, so trying to complete numpy symbols in a new python buffer isn't
> going to work.
>
> If the current buffer is already an ipython buffer, there's no reason to
> open a new one for completion. Just use the one that's already open.
>

the second was introduced because of lp:939320 ipython-complete increments prompt counter

wanted to separate the processes

Revision history for this message
Richard Stanton (a-stanton) wrote :

On 4/6/12 12:38 PM, "Andreas Roehler" <email address hidden> wrote:

>Am 06.04.2012 21:16, schrieb Richard Stanton:
>>> The cursor stays where it was and I don't get the strangely named new
>>> buffers, but the completion still doesn't work. I just get the message
>>> Can't find completion for "numpy.ar"
>>
>>
>> More information: If I try to complete "ex", it works fine, giving me a
>> buffer with a selection of words beginning with "ex". However, it fails
>>if
>> I try to complete "numpy.ar", and I think I know why. My main python
>> buffer is called *ND 0.12*. When I press Tab, a new python buffer is
>> created, called *Ipython*. I assume this is where the completion is
>> performed, but the problem is that numpy was imported in *my* python
>> buffer, so trying to complete numpy symbols in a new python buffer isn't
>> going to work.
>>
>> If the current buffer is already an ipython buffer, there's no reason to
>> open a new one for completion. Just use the one that's already open.
>>
>
>the second was introduced because of lp:939320 ipython-complete
>increments prompt counter
>
>wanted to separate the processes

Maybe make this an option? To me, not being able to complete any symbols
I've imported is a major problem. Having the counter increase is cosmetic.

Revision history for this message
Andreas Roehler (a-roehler) wrote :

having another look at this diff: might work only, if IPython started before.
will check this further tomorrow

Changed in python-mode:
status: In Progress → Fix Committed
Changed in python-mode:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.