all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* run-with-idle-timer Doc string Question
@ 2020-08-21 17:06 T.V Raman
  2020-08-21 19:06 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: T.V Raman @ 2020-08-21 17:06 UTC (permalink / raw)
  To: emacs-devel

What does this line:
Using
SECS <= N is not recommended if this function is invoked from an idle
timer, because FUNCTION will then be called immediately.

in the doc-string for run-with-idle-timer mean?

run-with-idle-timer is an interactive compiled Lisp function in
‘timer.el’.

(run-with-idle-timer SECS REPEAT FUNCTION &rest ARGS)

  Probably introduced at or before Emacs version 19.31.

Perform an action the next time Emacs is idle for SECS seconds.
The action is to call FUNCTION with arguments ARGS.
SECS may be an integer, a floating point number, or the internal
time format returned by, e.g., ‘current-idle-time’.
If Emacs is currently idle, and has been idle for N seconds (N < SECS),
then it will call FUNCTION in SECS - N seconds from now.  Using
SECS <= N is not recommended if this function is invoked from an idle
timer, because FUNCTION will then be called immediately.

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

This function returns a timer object which you can use in ‘cancel-timer’.

[back]


-- 
♉Id: kg:/m/0285kf1  🦮♉

-- 
♉Id: kg:/m/0285kf1  🦮♉



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-08-22 11:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-21 17:06 run-with-idle-timer Doc string Question T.V Raman
2020-08-21 19:06 ` Eli Zaretskii
2020-08-21 19:46   ` T.V Raman
2020-08-21 19:49     ` Eli Zaretskii
2020-08-21 20:49       ` Narendra Joshi
2020-08-21 21:23         ` Drew Adams
2020-08-22 11:05           ` Narendra Joshi

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.