From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rene Subject: Re: Alarms in orgmode Date: Wed, 12 Jun 2013 13:03:26 +0000 (UTC) Message-ID: References: <4AF2E545.3060309@fastmail.fm> <87r5sbzrxd.fsf@mundaneum.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60690) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmkiH-0007BH-35 for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 09:03:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UmkiF-0003w9-Sc for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 09:03:45 -0400 Received: from plane.gmane.org ([80.91.229.3]:48337) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmkiF-0003vu-M3 for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 09:03:43 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UmkiE-0001LM-AF for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 15:03:42 +0200 Received: from proxy-master.esisar.grenoble-inp.fr ([195.220.37.18]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Jun 2013 15:03:42 +0200 Received: from jlr_0 by proxy-master.esisar.grenoble-inp.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Jun 2013 15:03:42 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Sébastien Vauban 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) "'")))))