unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* alarm clocks and timers in Emacs?
@ 2017-04-02 10:05 Devin Prater
  2017-04-02 16:10 ` David Mann
  2017-04-02 19:14 ` tomas
  0 siblings, 2 replies; 5+ messages in thread
From: Devin Prater @ 2017-04-02 10:05 UTC (permalink / raw)
  To: help-gnu-emacs

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.



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

* Re: alarm clocks and timers in Emacs?
  2017-04-02 16:10 ` David Mann
@ 2017-04-02 13:28   ` Devin Prater
  2017-04-02 21:40     ` Bob Newell
  0 siblings, 1 reply; 5+ messages in thread
From: Devin Prater @ 2017-04-02 13:28 UTC (permalink / raw)
  To: help-gnu-emacs

David Mann <manndmd@gmail.com> writes:
Thanks for this. I'll take a look. A use case for me would be to set a
timer for when I’m on break during the day, setting a timer for maybe 10
minutes, and recieve a sound, or something Emacspeak could say, to let
me know that time is up so I can prepare to work again. If Org mode can
do all that, then it is powerful indeed!
> Devin Prater <r.d.t.prater@gmail.com> writes:
>
> Hi Devin
>
>> 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.
>
> Org-mode has various timers.
>
> David




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

* Re: alarm clocks and timers in Emacs?
  2017-04-02 10:05 alarm clocks and timers in Emacs? Devin Prater
@ 2017-04-02 16:10 ` David Mann
  2017-04-02 13:28   ` Devin Prater
  2017-04-02 19:14 ` tomas
  1 sibling, 1 reply; 5+ messages in thread
From: David Mann @ 2017-04-02 16:10 UTC (permalink / raw)
  To: help-gnu-emacs

Devin Prater <r.d.t.prater@gmail.com> writes:

Hi Devin

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

Org-mode has various timers.

David




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

* Re: alarm clocks and timers in Emacs?
  2017-04-02 10:05 alarm clocks and timers in Emacs? Devin Prater
  2017-04-02 16:10 ` David Mann
@ 2017-04-02 19:14 ` tomas
  1 sibling, 0 replies; 5+ messages in thread
From: tomas @ 2017-04-02 19:14 UTC (permalink / raw)
  To: help-gnu-emacs

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



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

* Re: alarm clocks and timers in Emacs?
  2017-04-02 13:28   ` Devin Prater
@ 2017-04-02 21:40     ` Bob Newell
  0 siblings, 0 replies; 5+ messages in thread
From: Bob Newell @ 2017-04-02 21:40 UTC (permalink / raw)
  To: help-gnu-emacs

Devin Prater <r.d.t.prater@gmail.com> writes:

> David Mann <manndmd@gmail.com> writes:
> Thanks for this. I'll take a look. A use case for me would be to set a
> timer for when I’m on break during the day, setting a timer for maybe 10
> minutes, and recieve a sound, or something Emacspeak could say, to let
> me know that time is up so I can prepare to work again. If Org mode can
> do all that, then it is powerful indeed!

I do exactly this right now. Check out the package 'pomodoro'. This is my
startup code to make use of it. 

(require 'pomodoro)
(global-set-key (kbd "<C-f1>") 'pomodoro-start)
(global-set-key (kbd "<C-f2>") 'pomodoro-stop)
(global-set-key (kbd "<C-f3>") 'pomodoro-pause)
(global-set-key (kbd "<C-f4>") 'pomodoro-resume)
(fset 'pomodoro " [ ]")
(pomodoro-add-to-mode-line)

You customize within 'pomodoro' to set your timers and your sounds. I
use a tea-kettle whistle to stop work and a factory whistle to start
again. Plenty of sound files out there to choose from.

-- 
Bob Newell
Honolulu, Hawai`i
* Via Gnus/BBDB/Org/Emacs/Linux *



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

end of thread, other threads:[~2017-04-02 21:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-02 10:05 alarm clocks and timers in Emacs? Devin Prater
2017-04-02 16:10 ` David Mann
2017-04-02 13:28   ` Devin Prater
2017-04-02 21:40     ` Bob Newell
2017-04-02 19:14 ` tomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).