bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#12447: 24.1.50; Stuck in garbage collection on OS X


From: Chong Yidong
Subject: bug#12447: 24.1.50; Stuck in garbage collection on OS X
Date: Thu, 20 Sep 2012 12:04:51 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Wed, 19 Sep 2012 20:21:32 +0400
>> From: Dmitry Gutov <dgutov@yandex.ru>
>> CC: jan.h.d@swipnet.se, 12447@debbugs.gnu.org, hanche@math.ntnu.no
>> 
>> By the way, here's what run-with-idle-timer docstring says:
>> "Perform an action the next time Emacs is idle for SECS seconds."
>> 
>> Shouldn't this mean that it should also pass DONT-WAIT nil?
>
> No, it just means no one considered the possibility that an idle timer
> will re-invoke itself like that.  IOW, the doc string is inaccurate.

I'm not 100% sure this is merely a doc string problem.  In the face of
ambiguity, we should try to choose the behavior that is least likely to
lead to infloops in user code.

When `run-with-idle-timer' is called from an idle timer, we could
interpret it to mean "run the function the next time Emacs becomes idle
for SECS seconds, not including the current period of idleness".

Such behavior seems quite reasonable.  And it is of course easy to
implement, by simply making `run-with-idle-timer' check if it is running
while idle and, if so, giving a nil second arg to
`timer-activate-by-idle'.





reply via email to

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