all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Michael Droettboom" <mike@droettboom.com>
To: "Dave Love" <fx@gnu.org>
Cc: bug-gnu-emacs@gnu.org
Subject: Re: python-complete-symbol hangs
Date: Sat, 8 Sep 2007 11:08:41 -0400	[thread overview]
Message-ID: <7b2578730709080808i7c65cb6cj157aea0c8cfce4dd@mail.gmail.com> (raw)
In-Reply-To: <msfy1p2x2x.fsf@marvin.smb.man.ac.uk>

[-- Attachment #1: Type: text/plain, Size: 1952 bytes --]

On 9/8/07, Dave Love <fx@gnu.org> wrote:
> "Michael Droettboom" <mike@droettboom.com> 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 #2: test.py --]
[-- Type: application/octet-stream, Size: 48 bytes --]

from sys import argv \
    exit
import os

os.p

[-- Attachment #3: Type: text/plain, Size: 149 bytes --]

_______________________________________________
bug-gnu-emacs mailing list
bug-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs

  reply	other threads:[~2007-09-08 15:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-07 17:55 python-complete-symbol hangs Michael Droettboom
2007-09-07 18:01 ` Michael Droettboom
2007-09-08 10:05   ` Michael Droettboom
2007-09-08 11:52 ` Dave Love
2007-09-08 15:08   ` Michael Droettboom [this message]
     [not found]     ` <E1IUCIn-0000Fi-Su@fencepost.gnu.org>
2007-09-10 12:50       ` Michael Droettboom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7b2578730709080808i7c65cb6cj157aea0c8cfce4dd@mail.gmail.com \
    --to=mike@droettboom.com \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=fx@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.