emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't interrupt directory_files_internal run fromtimer-event-handler


From: Stefan Monnier
Subject: Re: Can't interrupt directory_files_internal run fromtimer-event-handler
Date: Fri, 12 Aug 2005 07:59:04 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin)

>> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]