r989: Completion fails in python script buffer

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

Bug Description

With r989 under Windows, if I open a python script file (with ipython set as my default python shell), type some text, e.g., "ex", then press ESC-TAB to complete, Emacs waits for several seconds, then the cursor moves to the next tab position, I get the message "Completion function py-completion-at-point uses a deprecated calling convention" in the Minibuffer, and no completion activity occurs (not even a message telling me there are no completions).

This may well be related to #1004329.

Changed in python-mode:
assignee: nobody → Andreas Roehler (a-roehler)
milestone: none → 6.0.9
importance: Undecided → Medium
status: New → Confirmed
Changed in python-mode:
status: Confirmed → Fix Committed
Revision history for this message
Richard Stanton (a-stanton) wrote :

With r991, the cursor stays where it is, but now after typing "ex", ESC-TAB, I get the message

Can't find completion for "ex"

In a regular ipython shell (not running under Emacs), I am offered four choices of completion:

In [1]: ex
except exec execfile exit

Changed in python-mode:
status: Fix Committed → New
Revision history for this message
Andreas Roehler (a-roehler) wrote : Re: [Bug 1004613] Re: r989: Completion fails in python script buffer

Am 27.05.2012 00:07, schrieb Richard Stanton:
> With r991, the cursor stays where it is, but now after typing "ex", ESC-
> TAB, I get the message
>
> Can't find completion for "ex"
>
> In a regular ipython shell (not running under Emacs), I am offered four
> choices of completion:
>
> In [1]: ex
> except exec execfile exit
>

thats the result from test here also - ie a buffer *Python Completions* is opened displaying it

what tells

C-h v completion-at-point-functions RET

?

Thanks

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

completion-at-point-functions is a variable defined in `minibuffer.el'.
Its value is (ipython-complete t)
Local in buffer run.py; global value is nil

> -----Original Message-----
> From: <email address hidden> [mailto:<email address hidden>] On Behalf
> Of Andreas Roehler
> Sent: Sunday, May 27, 2012 2:03 AM
> To: Richard Stanton
> Subject: Re: [Bug 1004613] Re: r989: Completion fails in python script buffer
>
> Am 27.05.2012 00:07, schrieb Richard Stanton:
> > With r991, the cursor stays where it is, but now after typing "ex",
> > ESC- TAB, I get the message
> >
> > Can't find completion for "ex"
> >
> > In a regular ipython shell (not running under Emacs), I am offered
> > four choices of completion:
> >
> > In [1]: ex
> > except exec execfile exit
> >
>
> thats the result from test here also - ie a buffer *Python Completions* is
> opened displaying it
>
>
> what tells
>
> C-h v completion-at-point-functions RET
>
> ?
>
> Thanks
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1004613
>
> Title:
> r989: Completion fails in python script buffer
>
> Status in An Emacs mode for editing Python code:
> New
>
> Bug description:
> With r989 under Windows, if I open a python script file (with ipython
> set as my default python shell), type some text, e.g., "ex", then
> press ESC-TAB to complete, Emacs waits for several seconds, then the
> cursor moves to the next tab position, I get the message "Completion
> function py-completion-at-point uses a deprecated calling convention"
> in the Minibuffer, and no completion activity occurs (not even a
> message telling me there are no completions).
>
> This may well be related to #1004329.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/python-mode/+bug/1004613/+subscriptions

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

Am 27.05.2012 18:57, schrieb Richard Stanton:
> completion-at-point-functions is a variable defined in `minibuffer.el'.
> Its value is (ipython-complete t)
> Local in buffer run.py; global value is nil
>

does it still happen after re-compile and reload?

Does shebang not tell other than ipython?

thanks,

Andreas

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

I shut down Emacs and restarted - same result.

There's no shebang line in my script file. Instead, init.el contains the line

(setq py-shell-name "c:/python27/Scripts/ipython.bat")

> -----Original Message-----
> From: <email address hidden> [mailto:<email address hidden>] On Behalf
> Of Andreas Roehler
> Sent: Sunday, May 27, 2012 10:43 AM
> To: Richard Stanton
> Subject: Re: [Bug 1004613] Re: r989: Completion fails in python script buffer
>
> Am 27.05.2012 18:57, schrieb Richard Stanton:
> > completion-at-point-functions is a variable defined in `minibuffer.el'.
> > Its value is (ipython-complete t)
> > Local in buffer run.py; global value is nil
> >
>
> does it still happen after re-compile and reload?
>
> Does shebang not tell other than ipython?
>
> thanks,
>
> Andreas
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1004613
>
> Title:
> r989: Completion fails in python script buffer
>
> Status in An Emacs mode for editing Python code:
> Incomplete
>
> Bug description:
> With r989 under Windows, if I open a python script file (with ipython
> set as my default python shell), type some text, e.g., "ex", then
> press ESC-TAB to complete, Emacs waits for several seconds, then the
> cursor moves to the next tab position, I get the message "Completion
> function py-completion-at-point uses a deprecated calling convention"
> in the Minibuffer, and no completion activity occurs (not even a
> message telling me there are no completions).
>
> This may well be related to #1004329.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/python-mode/+bug/1004613/+subscriptions

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

Am 27.05.2012 21:04, schrieb Richard Stanton:
> I shut down Emacs and restarted - same result.
>
> There's no shebang line in my script file. Instead, init.el contains the line
>
> (setq py-shell-name "c:/python27/Scripts/ipython.bat")
>

okay, seeing some bug if no shebang is given, thanks.

Changed in python-mode:
milestone: 6.0.9 → 6.1.0
status: Incomplete → New
Revision history for this message
Andreas Roehler (a-roehler) wrote :

bug seems done

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

With r1012 under Windows, when I press ESC-TAB to complete "ex", I just get a message telling me (erroneously)

Can't find completion for "ex"

> -----Original Message-----
> From: <email address hidden> [mailto:<email address hidden>] On Behalf
> Of Andreas Roehler
> Sent: Friday, June 22, 2012 2:16 AM
> To: Richard Stanton
> Subject: [Bug 1004613] Re: r989: Completion fails in python script buffer
>
> bug seems done
>
> ** Changed in: python-mode
> Status: New => Fix Committed
>
> ** Changed in: python-mode
> Milestone: 6.1.0 => 6.0.10
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1004613
>
> Title:
> r989: Completion fails in python script buffer
>
> Status in An Emacs mode for editing Python code:
> Fix Committed
>
> Bug description:
> With r989 under Windows, if I open a python script file (with ipython
> set as my default python shell), type some text, e.g., "ex", then
> press ESC-TAB to complete, Emacs waits for several seconds, then the
> cursor moves to the next tab position, I get the message "Completion
> function py-completion-at-point uses a deprecated calling convention"
> in the Minibuffer, and no completion activity occurs (not even a
> message telling me there are no completions).
>
> This may well be related to #1004329.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/python-mode/+bug/1004613/+subscriptions

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

Two more pieces of information:

1) It fails on my Mac too.

2) When I press ESC-TAB, event though it reports not finding any completions, the *IPython-Complete* buffer has the following contents:

-----------

In [2]:
In [3]:
In [4]: except;exec;execfile;exit

In [5]:
-----------

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

Am 26.06.2012 19:18, schrieb Richard Stanton:
> Two more pieces of information:
>
> 1) It fails on my Mac too.
>
> 2) When I press ESC-TAB, event though it reports not finding any
> completions, the o buffer has the following contents:
>
> -----------o
>
> In [2]:
> In [3]:
> In [4]: except;exec;execfile;exit
>
> In [5]:
> -----------
>

ah, thanks, that's good

as you see, it offers you choices to complete, it can't now what to select. I.e. completion is only performed, if
singular.

Switching into the *IPython-Complete* buffer and pointing to it, should insert the completion.
If not, it's a bug

Andreas

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

Oddly, it now works on my Mac! I get a *Python Completions* buffer popping
up with four choices, and I can click on whichever one I want. This is the
behavior I want, but it's not what happens on my Windows machine. There,
the first time I press ESC-TAB, I get a message telling me it's unable to
complete "ex". If I then press ESC-TAB again, I get the same (correct)
behavior as on my Mac.

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

>Am 26.06.2012 19:18, schrieb Richard Stanton:
>> Two more pieces of information:
>>
>> 1) It fails on my Mac too.
>>
>> 2) When I press ESC-TAB, event though it reports not finding any
>> completions, the o buffer has the following contents:
>>
>> -----------o
>>
>> In [2]:
>> In [3]:
>> In [4]: except;exec;execfile;exit
>>
>> In [5]:
>> -----------
>>
>
>ah, thanks, that's good
>
>as you see, it offers you choices to complete, it can't now what to
>select. I.e. completion is only performed, if
>singular.
>
>Switching into the *IPython-Complete* buffer and pointing to it, should
>insert the completion.
>If not, it's a bug
>
>Andreas
>
>--
>You received this bug notification because you are subscribed to the bug
>report.
>https://bugs.launchpad.net/bugs/1004613
>
>Title:
> r989: Completion fails in python script buffer
>
>Status in An Emacs mode for editing Python code:
> New
>
>Bug description:
> With r989 under Windows, if I open a python script file (with ipython
> set as my default python shell), type some text, e.g., "ex", then
> press ESC-TAB to complete, Emacs waits for several seconds, then the
> cursor moves to the next tab position, I get the message "Completion
> function py-completion-at-point uses a deprecated calling convention"
> in the Minibuffer, and no completion activity occurs (not even a
> message telling me there are no completions).
>
> This may well be related to #1004329.
>
>To manage notifications about this bug go to:
>https://bugs.launchpad.net/python-mode/+bug/1004613/+subscriptions

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

made some changes, please re-open if needed

thanks,

Andreas

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

r 1017: Now pressing ESC-TAB doesn't seem to do anything at all!

Changed in python-mode:
status: Fix Committed → New
Revision history for this message
Andreas Roehler (a-roehler) wrote :

please re-open if this bug still exists

Changed in python-mode:
status: New → 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.