emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] org-show-notification will use todochiku.el if available
@ 2009-07-22 18:43 Jason F. McBrayer
  2009-07-23 15:41 ` Bastien
  0 siblings, 1 reply; 3+ messages in thread
From: Jason F. McBrayer @ 2009-07-22 18:43 UTC (permalink / raw)
  To: org-mode list


This is a little patch to let org-show-notification (in org-clock.el)
use the package [todochiku.el] if available.  This means that if
todochiku has been set up correctly, org-show-notification will work
with Growl (on MacOS) or Snarl (on MSWindows), as well as libnotify (on
*ix). 

[todochiku.el] http://www.emacswiki.org/emacs-se/ToDoChiKu
---
 lisp/org-clock.el |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 594d3cf..5428aa1 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -440,9 +440,12 @@ Notification is shown only once."
 	(setq org-clock-notification-was-shown nil)))))
 
 (defun org-show-notification (notification)
-  "Show notification. Use libnotify, if available."
-  (if (org-program-exists "notify-send")
-      (start-process "emacs-timer-notification" nil "notify-send" notification))
+  "Show notification. Use todochiku.el or libnotify, if available."
+  (if (fboundp 'todochiku-message)
+      (todochiku-message "org-mode notification" notification
+                         (todochiku-icon 'emacs))
+    (if (org-program-exists "notify-send")
+        (start-process "emacs-timer-notification" nil "notify-send" notification)))
   ;; In any case, show in message area
   (message notification))
 
-- 
1.6.1.2


-- 
+-----------------------------------------------------------+  
| Jason F. McBrayer                    jmcbray@carcosa.net  |  
| If someone conquers a thousand times a thousand others in |  
| battle, and someone else conquers himself, the latter one |  
| is the greatest of all conquerors.  --- The Dhammapada    |  

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

end of thread, other threads:[~2009-07-23 18:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-22 18:43 [PATCH] org-show-notification will use todochiku.el if available Jason F. McBrayer
2009-07-23 15:41 ` Bastien
2009-07-23 18:27   ` Jason F. McBrayer

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