From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jason S. Cornez" Newsgroups: gmane.emacs.bugs Subject: bug#6585: 23.1; Hang / CPU 100% on background interaction when in minibuffer Date: Tue, 31 Aug 2010 12:34:30 +0200 Message-ID: <4C7CDAB6.3090308@ravenpack.com> References: <20100708141906.C46AE80333@dev268-l> <4C7CA46A.7010001@ravenpack.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1283251195 26093 80.91.229.12 (31 Aug 2010 10:39:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 31 Aug 2010 10:39:55 +0000 (UTC) To: 6585@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 31 12:39:54 2010 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.69) (envelope-from ) id 1OqOFr-0000NP-Cj for geb-bug-gnu-emacs@m.gmane.org; Tue, 31 Aug 2010 12:39:51 +0200 Original-Received: from localhost ([127.0.0.1]:38937 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqOFq-0004rt-JC for geb-bug-gnu-emacs@m.gmane.org; Tue, 31 Aug 2010 06:39:50 -0400 Original-Received: from [140.186.70.92] (port=50792 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqOFi-0004rP-Nx for bug-gnu-emacs@gnu.org; Tue, 31 Aug 2010 06:39:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OqOFh-0007jb-Em for bug-gnu-emacs@gnu.org; Tue, 31 Aug 2010 06:39:42 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56796) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqOFh-0007jV-Bl for bug-gnu-emacs@gnu.org; Tue, 31 Aug 2010 06:39:41 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OqO9F-0005gZ-ON; Tue, 31 Aug 2010 06:33:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Jason S. Cornez" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Aug 2010 10:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6585-submit@debbugs.gnu.org id=B6585.128325078021849 (code B ref 6585); Tue, 31 Aug 2010 10:33:01 +0000 Original-Received: (at 6585) by debbugs.gnu.org; 31 Aug 2010 10:33:00 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqO9D-0005gM-81 for submit@debbugs.gnu.org; Tue, 31 Aug 2010 06:32:59 -0400 Original-Received: from out1.smtp.messagingengine.com ([66.111.4.25]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqO9A-0005gG-Uc for 6585@debbugs.gnu.org; Tue, 31 Aug 2010 06:32:57 -0400 Original-Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id A14D5A9 for <6585@debbugs.gnu.org>; Tue, 31 Aug 2010 06:34:34 -0400 (EDT) Original-Received: from frontend2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 31 Aug 2010 06:34:34 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpout; bh=B++6jbOR+oEb1Csfl0+J/teoO4w=; b=SDPPw2rN15DbmV86L7XB3YOU9+Vuy2lG26AlfDUGTjpNp9uIWEkJ5N1iQ4Pqvac66FQ695nwJVnVAiOKxSEW/9KnLiSz6CD3h55Z2dFxsTSPHsI/5C+4Jm9tfe5RCl885LE/osTo3IKQB8+xlekIlrtADqCbAezZND7MsUwX71o= X-Sasl-enc: Tm0qH9fe2cgJL4JqQ6QA2wmN0OmpeiZG4mSFog8AHJJf 1283250874 Original-Received: from [10.1.3.5] (89.Red-83-36-62.staticIP.rima-tde.net [83.36.62.89]) by mail.messagingengine.com (Postfix) with ESMTPSA id 9381D5E4F71 for <6585@debbugs.gnu.org>; Tue, 31 Aug 2010 06:34:33 -0400 (EDT) User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9pre) Gecko/20100821 Lanikai/3.1.3pre ThunderBrowse/3.3.2 In-Reply-To: X-Enigmail-Version: 1.1.2 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 31 Aug 2010 06:33:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org 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:39850 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Yes, I agree about fixing the elisp code - indeed this has been done. But what about when the code isn't mine, but is in some library I happen to be using? Again, the right solution is always to fix the code, but that might not be possible for the end user of emacs to do. But I find it difficult to accept that emacs gets wedged like it does. I love emacs and having to kill the process from the OS is just so, so sad. I would love a C-g C-g C-g option (just like there is ESC ESC ESC). And it would be even better if this could work in conjunction with some flag so that it pops me into the debugger and I can see what function I've broken out of. So again, I know the elisp code was broken. But I still say that emacs is broken since it is currently impossible to salvage the situation. Yes, it is a sign of a bug somewhere - and I want emacs to help me find it, or at least escape from it. Thanks for your consideration, - -Jason On 08/31/2010 12:24 PM, Stefan Monnier wrote: >> Of course, fixing the elisp function is easy and that simply and >> effectively avoids this problem. Still, I find it disconcerting that I >> can lockup emacs in such a manner. > > All code run from timers and from (post|pre)-command-hook (as well as > jit-lock, filters, and a few other things) is run with inhibit-quit set > to t because the user may not know this code is running so if she hits > C-g it "probably" means she wants to interrupt something else. > > It's not broken. Basically, the problem is in your code: such async > code should not run for indefinite amount of time, whereas your code may > inf-loop. > > 2 solutions: > - fix your code so it doesn't inf-loop (usually the best solution). > - wrap your code in with-local-quit to let C-g interrupt it. > > Admittedly, Emacs should also additionally understand something like C-g > C-g C-g C-g as a sign that the user is getting impatient and we should > thus ignore the inhibit-quit flag. But such a case is always a sign of > a bug somewhere. > > > Stefan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkx82rYACgkQQlm6HDTMLyPZZwCgu6ONheghjKDSYg0Ra5j0+rFt EPYAoNR1225PzzmNFl34bgThRGijd/HW =bUAm -----END PGP SIGNATURE-----