emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Alarms in orgmode


From: Rene
Subject: Re: [O] Alarms in orgmode
Date: Wed, 12 Jun 2013 13:03:26 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Sébastien Vauban <address@hidden> 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) "'")))))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]