emacs-devel
[Top][All Lists]
Advanced

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

Re: idledo.el v. 0.3


From: D . Goel
Subject: Re: idledo.el v. 0.3
Date: 23 Oct 2002 19:23:09 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

address@hidden (Kim F. Storm) writes:
> 
> If you look at run-with-timer, the REPEAT parameter may be an
> integer/float indicating a repeat period for the timer, while for
> run-with-idle-timer, repeat is just a boolean.
> 
> IMO, the clean enhancement to timer.el would be to allow REPEAT to be
> a number for run-with-idle-timer as well.


run-with-idle-timer (secs repeat function &rest args)

Current functionality:

 If REPEAT is non-nil, do the action each time Emacs has been idle for
 exactly SECS seconds (that is, only once for each time Emacs becomes idle).


Are you suggesting instead that:
(1)
 If REPEAT is t, do the action each time Emacs has been idle for
 exactly SECS seconds (that is, only once for each time Emacs becomes idle).
 
 It REPEAT is a number, keep repeating the action for REPEAT seconds
 as long as emacs remains idle.  

or that:
(2)
 If REPEAT is t, do the action each time Emacs has been idle for
 exactly SECS seconds (that is, only once for each time Emacs becomes idle).

 If REPEAT is a number, do the action each time Emacs has been idle
 for exactly REPEAT seconds (that is, only once for each time Emacs
 becomes idle).
?


The second one makes more sense to me, since REPEAT in
run-with-idle-timer deals not with repeat-while-idle but with
REPEAT-when-next-idle... OTOH, the first one would (incompletely) mix
the 2 different booleans/numbers into one REPEAT..



(Of course, if the seocnd option is what happens, or if none of the
two happen, we still haven't provided the functionality of 'repeating
as long as emacs remains' idle..

for which one could have new function named as, say run-while-idle-timer. )

PS: run-with-idle-timer indeed has more "degrees of freedom" than does
"run-with-timer"...



DG                                 http://deego.gnufans.org/~deego/
--




reply via email to

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