From: "Sébastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: Alarms in orgmode
Date: Fri, 06 Nov 2009 14:47:10 +0100 [thread overview]
Message-ID: <87r5sbzrxd.fsf@mundaneum.com> (raw)
In-Reply-To: 4AF2E545.3060309@fastmail.fm
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
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
next prev parent reply other threads:[~2009-11-06 13:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-05 14:46 Alarms in orgmode Erwin Panen
2009-11-06 13:47 ` Sébastien Vauban [this message]
2009-11-06 17:18 ` Erwin Panen
2013-06-12 13:03 ` Rene
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=87r5sbzrxd.fsf@mundaneum.com \
--to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
--cc=emacs-orgmode-mXXj517/zsQ@public.gmane.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).