GNU bug report logs -
#12447
24.1.50; Stuck in garbage collection on OS X
Previous Next
Full log
Message #103 received at 12447 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Date: Wed, 19 Sep 2012 20:21:32 +0400
>> From: Dmitry Gutov <dgutov <at> yandex.ru>
>> CC: jan.h.d <at> swipnet.se, 12447 <at> debbugs.gnu.org, hanche <at> 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'.
This bug report was last modified 12 years and 247 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.