From: Rene <jlr_0@yahoo.com>
To: emacs-orgmode@gnu.org
Subject: Re: Alarms in orgmode
Date: Wed, 12 Jun 2013 13:03:26 +0000 (UTC) [thread overview]
Message-ID: <loom.20130612T145515-198@post.gmane.org> (raw)
In-Reply-To: 87r5sbzrxd.fsf@mundaneum.com
Sébastien Vauban <wxhgmqzgwmuf@...> writes:
> --8<---------------cut here---------------start------------->8---
> (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---
If two (or more) appointments happen to start at the same time then
appt-disp-window-function leads to the following error: “Argtype error in
‘appt-disp-window-function’ - update it for multiple appts?”
A more suited piece of code would be:
(setq appt-disp-window-function
(lambda (min-to-app new-time appt-msg) ; these args could be lists
(or (listp min-to-app)
(setq appt-msg (list appt-msg)))
(dotimes (i (length appt-msg))
(shell-command
(concat "notify-send "
"-i /usr/share/icons/gnome/32x32/status/appointment-soon.png "
"-t 1000 "
"'Appointment' "
"'" (nth i appt-msg) "'")))))
prev parent reply other threads:[~2013-06-12 13:03 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
2009-11-06 17:18 ` Erwin Panen
2013-06-12 13:03 ` Rene [this message]
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=loom.20130612T145515-198@post.gmane.org \
--to=jlr_0@yahoo.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).