From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: emacs.py: catch all errors in eargs() Date: Wed, 30 Aug 2006 17:11:10 -0400 Message-ID: References: <20060830184055.3A56.SLAWOMIR.NOWACZYK.847@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1156972311 18293 80.91.229.2 (30 Aug 2006 21:11:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 30 Aug 2006 21:11:51 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 30 23:11:48 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GIXLR-0000KL-R6 for ged-emacs-devel@m.gmane.org; Wed, 30 Aug 2006 23:11:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GIXLR-0001NJ-5P for ged-emacs-devel@m.gmane.org; Wed, 30 Aug 2006 17:11:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GIXLD-0001MD-Ai for emacs-devel@gnu.org; Wed, 30 Aug 2006 17:11:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GIXLB-0001Kz-OT for emacs-devel@gnu.org; Wed, 30 Aug 2006 17:11:18 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GIXLB-0001Kw-If for emacs-devel@gnu.org; Wed, 30 Aug 2006 17:11:17 -0400 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GIXUf-00009J-1z for emacs-devel@gnu.org; Wed, 30 Aug 2006 17:21:05 -0400 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 114B32CEFA8; Wed, 30 Aug 2006 17:11:17 -0400 (EDT) Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id D24963FE0; Wed, 30 Aug 2006 17:11:10 -0400 (EDT) Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id C11D54C6D25; Wed, 30 Aug 2006 17:11:10 -0400 (EDT) Original-To: Slawomir Nowaczyk In-Reply-To: <20060830184055.3A56.SLAWOMIR.NOWACZYK.847@student.lu.se> (Slawomir Nowaczyk's message of "Wed, 30 Aug 2006 19:06:37 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:59130 Archived-At: > The following patch ensures that _emacs_out sentinel is *always* > printed, regardless of what "name" could be. This is necessary for > proper handling of eldoc-mode in python.el > Current code hangs emacs on my machine when I enable eldoc-mode and put > point over non-function like "print". Thanks, I'll lok at it. But this is large enough with previous contributions that I'm beginning to feel like I should need until your legal paperwork comes in before committing it. > BTW, shouldn't it *always* be possible to interrupt emacs by C-g? In my Yes. > case even C-g doesn't work, I have to kill emacs... I assume Looks like a bug in python.el where we fail to re-enable C-g before doing the accept-process-output (C-g is disabled by inhibit-quit when running timers and such). I installed the patch below which should fix it. Stefan Index: python.el =================================================================== RCS file: /sources/emacs/emacs/lisp/progmodes/python.el,v retrieving revision 1.45 diff -u -u -b -r1.45 python.el --- python.el 28 Aug 2006 21:58:27 -0000 1.45 +++ python.el 30 Aug 2006 21:09:30 -0000 @@ -1599,6 +1599,8 @@ instance. Assumes an inferior Python is running." (let ((symbol (with-syntax-table python-dotty-syntax-table (current-word)))) + ;; This is run from timers, so inhibit-quit tends to be set. + (with-local-quit ;; First try the symbol we're on. (or (and symbol (python-send-receive (format "emacs.eargs(%S, %s)" @@ -1616,7 +1618,7 @@ (python-send-receive (format "emacs.eargs(%S, %s)" (buffer-substring-no-properties (point) point) - python-imports))))))))))) + python-imports)))))))))))) ;;;; Info-look functionality.