bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: python-complete-symbol hangs


From: Michael Droettboom
Subject: Re: python-complete-symbol hangs
Date: Sat, 8 Sep 2007 11:08:41 -0400

On 9/8/07, Dave Love <address@hidden> wrote:
> "Michael Droettboom" <address@hidden> writes:
>
> > python-complete-symbol works by calling "complete()" in etc/emacs.py.
> > If that Python function fails (i.e. raises an exception), emacs will
> > hang waiting for a response, with no recourse but to kill the emacs
> > process.
>
> Can you supply a test case?

See the attached.  Move cursor to bottom of file, then run
"python-update-imports", then "python-complete-symbol".

This causes a hang for me on

   22.1.5 from source on Linux
   current cvs head from source on Linux
   22.1.1 as CarbonEmacs Package on OS-X

All of these cases are using Python 2.5 (in case that makes the
difference here).

>  First of all, how does it raise an
> exception?

It raises a SyntaxError exception because the imports built by
"python-update-imports" are invalid (see my other bug report).

> If you have to kill it like that, it's surely a basic Emacs bug,
> regardless of any python.el bugs.

The entire emacs process becomes unresponsive to keystrokes and mouse
events.  Is there something else I should try?

> > The attached patch fixes this by always outputting a response.
>
> That shouldn't be necessary.  I think there were several things broken
> or not fixed in the one shipped with Emacs 22, and that one sounds
> familiar.  Sorry I don't have a working version since I didn't keep up
> with the incompatibilities introduced by Emacs 22.
>
> http://www.loveshack.ukfsn.org/emacs/python-21.el behaves as I expect
> -- providing a null completion list -- if emacs.complete raises an
> exception.

Indeed -- that works for me also -- without making any changes to
emacs.py.  That is a workable solution for me for now.

Perhaps some of your changes (the diff between python-21.el and emacs
22's python.el is quite large) should be merged into the main Emacs
CVS.

Thanks for your help.

Cheers,
Mike

-- 
Michael Droettboom
http://www.droettboom.com/

Attachment: test.py
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]