emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Roberto Huelga <rhuelga@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Patch org-timer-set-timer
Date: Tue, 3 Sep 2013 11:59:26 +0200	[thread overview]
Message-ID: <CAPJ+JL2XKGOjSNC6uDrR98geQpNwsV5bnrPhxRse2o=wjEqKAg@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 117 bytes --]

Patch proposal for org-timer-set-timer

Thanks for your great work, and I hope be sending all in the correct format.

[-- Attachment #1.2: Type: text/html, Size: 163 bytes --]

[-- Attachment #2: 0001-Timer-play-a-sound-as-configured-by-org-clock-sound-.patch --]
[-- Type: application/octet-stream, Size: 1331 bytes --]

From 3accc5c389ca001231c514a49bb58906b57f94f8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Roberto=20Huelga=20D=C3=ADaz?= <rhuelga@gmail.com>
Date: Tue, 3 Sep 2013 11:53:15 +0200
Subject: [PATCH] Timer: play a sound as configured by `org-clock-sound'
 actualy only beep
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* lisp/org-timer.el (org-timer-set-timer): use the variable
  `org-clock-sound' when calling `org-notify'

When org-notify second parameter is t we only get the standard beep.
Evaluating with coma we can use different sounds for differents
running timers, as `org-clock-sound' was set when
`org-timer-set-timer' get execute

Patch proposal by Roberto Huelga Díaz.

TINYCHANGE
---
 lisp/org-timer.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-timer.el b/lisp/org-timer.el
index 2351c4c..2ea1c35 100644
--- a/lisp/org-timer.el
+++ b/lisp/org-timer.el
@@ -429,7 +429,7 @@ replace any running timer."
 		    (run-with-timer
 		     secs nil `(lambda ()
 				 (setq org-timer-current-timer nil)
-				 (org-notify ,(format "%s: time out" hl) t)
+				 (org-notify ,(format "%s: time out" hl) ,org-clock-sound)
 				 (setq org-timer-timer-is-countdown nil)
 				 (org-timer-set-mode-line 'off)
 				 (run-hooks 'org-timer-done-hook))))
-- 
1.8.1


             reply	other threads:[~2013-09-03  9:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-03  9:59 Roberto Huelga [this message]
2013-09-06 14:02 ` Patch org-timer-set-timer Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPJ+JL2XKGOjSNC6uDrR98geQpNwsV5bnrPhxRse2o=wjEqKAg@mail.gmail.com' \
    --to=rhuelga@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

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