From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Michael Droettboom" Newsgroups: gmane.emacs.bugs Subject: Re: python-complete-symbol hangs Date: Sat, 8 Sep 2007 11:08:41 -0400 Message-ID: <7b2578730709080808i7c65cb6cj157aea0c8cfce4dd@mail.gmail.com> References: <7b2578730709071055s6a9a13a0y956c40de548e0dc8@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2858_17254775.1189264121588" X-Trace: sea.gmane.org 1189264131 8125 80.91.229.12 (8 Sep 2007 15:08:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 8 Sep 2007 15:08:51 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: "Dave Love" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 08 17:08:50 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IU1vV-0006RX-N8 for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Sep 2007 17:08:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IU1vT-00041e-Ae for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Sep 2007 11:08:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IU1vQ-0003w0-Bn for bug-gnu-emacs@gnu.org; Sat, 08 Sep 2007 11:08:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IU1vP-0003uM-Mc for bug-gnu-emacs@gnu.org; Sat, 08 Sep 2007 11:08:43 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IU1vP-0003u8-EF for bug-gnu-emacs@gnu.org; Sat, 08 Sep 2007 11:08:43 -0400 Original-Received: from rv-out-0910.google.com ([209.85.198.190]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IU1vO-0000aa-Sa for bug-gnu-emacs@gnu.org; Sat, 08 Sep 2007 11:08:43 -0400 Original-Received: by rv-out-0910.google.com with SMTP id c27so612996rvf for ; Sat, 08 Sep 2007 08:08:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; bh=9MIkQGQ6p+lVFfQf83zU5k4at09E1STZ/jBQUEs2zys=; b=V1Ol6kVS6MddwDWwVEuXzpk/JpOFGXq6hSsfreCq7kV/SV3gC9TNqBS4LuRbiPO1HQ33Hw9oORzPyL0WC2arqVORYhuJ8zvPvLC+Q7uiAWAP7DL+1AYhaRKI8+Y7MPVRPM92+750klchKn1vG5vejvOa/rFCk6uElxMjkj2gncQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=a5ryruQjvkmePw8eLjPNzvuYygYbfxktdStyWJtXbF8psdjxX6N693UsfXVDfFiunFEBdLujADxQpnDyIAt8zJsyhX4SuToML3YzyYqHk820GXsCz9+OUdI499JA9L8lG7H/rKA7q+829ggRSpprcWtlVURgnYvgwQf6aMgUTAk= Original-Received: by 10.141.3.10 with SMTP id f10mr1162761rvi.1189264121604; Sat, 08 Sep 2007 08:08:41 -0700 (PDT) Original-Received: by 10.141.84.18 with HTTP; Sat, 8 Sep 2007 08:08:41 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: 691fa2ea7d6321a3 X-Detected-Kernel: Linux 2.6 (newer, 2) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16510 Archived-At: ------=_Part_2858_17254775.1189264121588 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 9/8/07, Dave Love wrote: > "Michael Droettboom" 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/ ------=_Part_2858_17254775.1189264121588 Content-Type: application/octet-stream; name="test.py" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="test.py" X-Attachment-Id: f_f6c92zor ZnJvbSBzeXMgaW1wb3J0IGFyZ3YgXAogICAgZXhpdAppbXBvcnQgb3MKCm9zLnAK ------=_Part_2858_17254775.1189264121588 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ bug-gnu-emacs mailing list bug-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs ------=_Part_2858_17254775.1189264121588--