From mboxrd@z Thu Jan 1 00:00:00 1970 From: jmcbray@carcosa.net (Jason F. McBrayer) Subject: [PATCH] org-show-notification will use todochiku.el if available Date: Wed, 22 Jul 2009 14:43:30 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MTgmw-0007zB-JB for emacs-orgmode@gnu.org; Wed, 22 Jul 2009 14:43:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MTgmv-0007xM-Nm for emacs-orgmode@gnu.org; Wed, 22 Jul 2009 14:43:37 -0400 Received: from [199.232.76.173] (port=34470 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTgmv-0007ww-BS for emacs-orgmode@gnu.org; Wed, 22 Jul 2009 14:43:37 -0400 Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.121]:34783) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MTgms-0002Vt-So for emacs-orgmode@gnu.org; Wed, 22 Jul 2009 14:43:35 -0400 Received: from bertrand.carcosa.net ([75.182.35.178]) by cdptpa-omta01.mail.rr.com with ESMTP id <20090722184331145.GWVN26619@cdptpa-omta01.mail.rr.com> for ; Wed, 22 Jul 2009 18:43:31 +0000 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org 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 |