[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Re: Alarms in orgmode
From: |
Sébastien Vauban |
Subject: |
[Orgmode] Re: Alarms in orgmode |
Date: |
Fri, 06 Nov 2009 14:47:10 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
Hi Erwin,
Erwin Panen wrote:
> I was looking to set an audible alarm or at least display a message of some
> kind. Google brought me no results, apart from capabilities that are within
> Emacs itself, namely the diary & appointments.
> http://www.gnu.org/software/emacs/manual/html_node/emacs/Appointments.html
>
> Can anyone point me to how to do this, if possible at all.
> (I'm on windows environment, but interested in Linux too.)
The following works for me (yes, I know, I should clean a bit) under Ubuntu at
least.
--8<---------------cut here---------------start------------->8---
(require 'org-agenda)
;; Insinuate appt
(require 'appt)
(setq appt-time-msg-list nil)
(org-agenda-to-appt)
;; When use 'r' (rebuild agenda) reload appt
(add-hook 'org-agenda-mode-hook (lambda ()
(setq appt-time-msg-list nil)
(org-agenda-to-appt)))
(setq appt-audible t)
(setq appt-display-format 'echo)
;; turn appointment checking on
(appt-activate 1)
;; time in minutes before an appointment that the warning begins
(setq appt-message-warning-time 15) ; 12
;; number of minutes to wait between checking the appointment list
(setq appt-display-interval 5) ; 3
;; update appt each time agenda opened
(add-hook 'org-finalize-agenda-hook 'org-agenda-to-appt)
(when window-system
(setq appt-display-format 'window)
;; FIXME Check `notify-send' (in `libnotify-bin' Ubuntu package) is
installed
(defun rgr/org-display (min-to-app new-time msg)
(shell-command
(concat "notify-send "
"-i /usr/share/icons/gnome/32x32/status/appointment-soon.png "
"'Appointment' "
"'" msg "'")))
;; TODO For Windows users: use todochicku.el and the snarl notifier
(setq appt-disp-window-function (function rgr/org-display)))
--8<---------------cut here---------------end--------------->8---
Take what's of use for you from the above.
Best regards,
Seb
--
Sébastien Vauban