Comment 4 for bug 981991

Revision history for this message
Richard Stanton (a-stanton) wrote : RE: [Bug 981991] [NEW] Completion not working in python script buffer

Further investigating:

At line 11,029 in function ipython-complete, py-set-ipython-completion-command-string... returns the (wrong) result

"print(';'.join(__IP.Completer.all_completions('%s'))) #PYTHON-MODE SILENT\n"

> -----Original Message-----
> From: Richard Stanton
> Sent: Sunday, April 15, 2012 4:47 PM
> To: 'Bug 981991'
> Subject: RE: [Bug 981991] [NEW] Completion not working in python script
> buffer
>
> One more followup: I note that the code ipython is complaining about below
> is only supposed to be passed to ipython 0.10, but I'm using 0.12 (and
> ipython-version equals 12).
>
> > -----Original Message-----
> > From: Richard Stanton
> > Sent: Sunday, April 15, 2012 4:28 PM
> > To: 'Bug 981991'
> > Subject: RE: [Bug 981991] [NEW] Completion not working in python
> > script buffer
> >
> > Try your code but set
> >
> > (setq py-shell-name "ipython")
> >
> > In your init.el first. Completion seems to work if I don't have this
> > set, but fails if I do.
> >
> >
> > > -----Original Message-----
> > > From: <email address hidden> [mailto:<email address hidden>] On
> Behalf
> > > Of Andreas Roehler
> > > Sent: Saturday, April 14, 2012 11:53 PM
> > > To: Richard Stanton
> > > Subject: Re: [Bug 981991] [NEW] Completion not working in python
> > > script buffer
> > >
> > > Am 15.04.2012 02:09, schrieb Richard Stanton:
> > > > Public bug reported:
> > > >
> > > > In r937, when I press ESC-TAB in my python script buffer, Emacs no
> > > > longer hangs, which is good.
> > > >
> > > > However, if I type, say, "ex" and then ESC-TAB, I get the message
> > > >
> > > > Can't find completion for "ex"
> > > >
> > > > Looking further, I see that there is a new buffer called
> > > > *IPython*, with contents
> > > >
> > > >
> > > > In [1]: ---------------------------------------------------------------------------
> > > > NameError Traceback (most recent call last)
> > > > c:\projects\<ipython-input-1-ba21655add90> in<module>()
> > > > ----> 1 print(';'.join(__IP.Completer.all_completions('ex')))
> > > > ----> #PYTHON-MODE SILENT
> > > >
> > > > NameError: name '__IP' is not defined
> > > >
> > > > In [2]:
> > > >
> > >
> > > thanks making a new report
> > >
> > > can't reproduce with Emacs -Q and python-mode.el - see png attached.
> > > Please send some example code
> > >
> > >
> > > ** Attachment added: "ex1.png"
> > >
> > >
> >
> https://bugs.launchpad.net/bugs/981991/+attachment/3069436/+files/ex1.
> > > png
> > >
> > > --
> > > You received this bug notification because you are subscribed to the
> > > bug report.
> > > https://bugs.launchpad.net/bugs/981991
> > >
> > > Title:
> > > Completion not working in python script buffer
> > >
> > > Status in An Emacs mode for editing Python code:
> > > New
> > >
> > > Bug description:
> > > In r937, when I press ESC-TAB in my python script buffer, Emacs no
> > > longer hangs, which is good.
> > >
> > > However, if I type, say, "ex" and then ESC-TAB, I get the message
> > >
> > > Can't find completion for "ex"
> > >
> > > Looking further, I see that there is a new buffer called *IPython*,
> > > with contents
> > >
> > >
> > > In [1]: ---------------------------------------------------------------------------
> > > NameError Traceback (most recent call last)
> > > c:\projects\<ipython-input-1-ba21655add90> in <module>()
> > > ----> 1 print(';'.join(__IP.Completer.all_completions('ex')))
> > > #PYTHON-MODE SILENT
> > >
> > > NameError: name '__IP' is not defined
> > >
> > > In [2]:
> > >
> > > To manage notifications about this bug go to:
> > > https://bugs.launchpad.net/python-mode/+bug/981991/+subscriptions