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

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

Re: alarm clocks and timers in Emacs?


From: tomas
Subject: Re: alarm clocks and timers in Emacs?
Date: Sun, 2 Apr 2017 21:14:06 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, Apr 02, 2017 at 10:05:37AM +0000, Devin Prater wrote:
> Hi all. Does anyone know if there are any kinds of alarm clocks or
> timers in Emacs, or in Elpa or Melpa? Just one of those things I’d like
> to have in my… Desktop.

See the entries timers [1] and idle timers [2] in the Emacs Lisp manual.

Basically, you call

  (run-at-time "12:00" my-function)

for calling my-function at an absolute time, or

  (run-at-time "1 min" my-function)

to call my-function a minute from now. Repeats can be specified, etc.

The "idle" variants are for when you want to specify that Emacs be idle
for that long to actually call your function.

See the docs for the gories. Or ask here for more specifics.

[1] https://www.gnu.org/software/emacs/manual/html_node/elisp/Timers.html#Timers
[2] 
https://www.gnu.org/software/emacs/manual/html_node/elisp/Idle-Timers.html#Idle-Timers

regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAljhTX4ACgkQBcgs9XrR2kZgsQCfW2rICR/IXITE/y4RHXYgUmcH
izYAn05Q4ADHWyZjrTkuGi5JwNIYOxSm
=Yr3f
-----END PGP SIGNATURE-----



reply via email to

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