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: Can't interrupt directory_files_internal run fromtimer-event-handler Date: Fri, 12 Aug 2005 07:59:04 -0400 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1123850457 5991 80.91.229.2 (12 Aug 2005 12:40:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 12 Aug 2005 12:40:57 +0000 (UTC) Cc: kzeitler@lucent.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 12 14:40:50 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E3Yol-0007Pe-FN for ged-emacs-devel@m.gmane.org; Fri, 12 Aug 2005 14:39:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E3Yry-0003hT-G2 for ged-emacs-devel@m.gmane.org; Fri, 12 Aug 2005 08:42:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E3YUU-00024W-M9 for emacs-devel@gnu.org; Fri, 12 Aug 2005 08:18:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E3YRf-0000ml-3K for emacs-devel@gnu.org; Fri, 12 Aug 2005 08:15:32 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E3YP5-000842-FF for emacs-devel@gnu.org; Fri, 12 Aug 2005 08:12:51 -0400 Original-Received: from [195.186.19.62] (helo=mail14.bluewin.ch) by monty-python.gnu.org with esmtp (Exim 4.34) id 1E3YQP-00066n-6q for emacs-devel@gnu.org; Fri, 12 Aug 2005 08:14:13 -0400 Original-Received: from empanada.local (62.203.41.131) by mail14.bluewin.ch (Bluewin 7.2.063) id 42D27FC0004D2897; Fri, 12 Aug 2005 11:59:06 +0000 Original-Received: by empanada.local (Postfix, from userid 502) id 578716077B9; Fri, 12 Aug 2005 07:59:04 -0400 (EDT) Original-To: In-Reply-To: (klaus berndl's message of "Fri, 12 Aug 2005 10:00:18 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) 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:41948 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41948 >> I'd say use while-no-input but you're in a better position to make this call. > the only thing i wanted is: An expert-estimation if while-no-input is > a good way - or with-local-quit - if i remember right you said that this > could easily being backported - maybe its not a really good idea to use > a macro which is only available in forthcoming Emacs 22 - IMHO also users > of Emacs 21.X should get a good solution... while-no-input is a more general and robust way to do what your (while (not (input-pending-p))) is trying to do. It's basically designed specifically for cases like yours. But it's a new feature in Emacs-22. with-local-quit is just a convenient macro to temporarily disable inhibit-quit (that's typically set in timers, post-command-hooks, ...). The macro-expanded code doesn't use any new feature. It's not a general solution to your problem, but it can be used to solve the specific problem of the OP where C-g wasn't able to unfreeze Emacs. > is there a short example how to use this with-local-quit? This would help me > a lot - or a pointer where to find such an example.. cd ...emacs/lisp; grep with-local-quit **/*.el Read the definition of the macro: it's fairly simple. Stefan