From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ivan Vilata i Balaguer Subject: Re: Reminders with alarms Date: Mon, 03 Oct 2011 13:45:49 +0200 Message-ID: <87zkhq860y.fsf@rampella.terramar.selidor.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:49047) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAldl-0007aK-1p for emacs-orgmode@gnu.org; Mon, 03 Oct 2011 12:45:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RAldg-0004Vc-6a for emacs-orgmode@gnu.org; Mon, 03 Oct 2011 12:45:16 -0400 Received: from lo.gmane.org ([80.91.229.12]:57716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAldf-0004VE-Tq for emacs-orgmode@gnu.org; Mon, 03 Oct 2011 12:45:12 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RAldc-0005Hw-W8 for emacs-orgmode@gnu.org; Mon, 03 Oct 2011 18:45:08 +0200 Received: from 204.138.19.95.dynamic.jazztel.es ([95.19.138.204]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 03 Oct 2011 18:45:08 +0200 Received: from ivan by 204.138.19.95.dynamic.jazztel.es with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 03 Oct 2011 18:45:08 +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 brian powell (2011-09-08 17:42:02 +0200) wrote: > P.S. I've used calendar/*Fancy Diary Entries* and appt.el for many > years--works great--I just have it pop up a big blank emacs screen > with the alarm reminder--I usually set it for 15 minutes ahead of the > important reminder: > ;;; appt.el --- appointment notification functions. > ;; Copyright (C) 1989, 1990, 1994 Free Software Foundation, Inc. > ;; Author: Neil Mager > ... > (setq appt-message-warning-time 15) > (setq appt-display-interval 5) I also use appt.el, but I've written a notification function that calls a little script to use FreeDesktop.org's notifications and send a message to Screen sessions. The script is only called from the Emacs server process to avoid repeated messages, since I may have other Emacs processes running. The function is (customize appt-disp-window-function to use this): ----8<---- (defun ivb/appt-disp-window (min-to-app new-time appt-msg) (if (condition-case nil (server-running-p) (void-function nil)) (call-process "notify" nil 0 nil "Reminder" appt-msg)) (appt-disp-window min-to-app new-time appt-msg)) ----8<---- The "notify" script contains: ----8<---- #!/bin/sh case $# in 1) title="Notification" message="$1" ;; 2) title="$1" message="$2" ;; *) echo "Usage: $(basename $0) [TITLE] MESSAGE" > /dev/stderr exit 1 esac # Show X notification on current display. test "$DISPLAY" && notify-send -t 0 "$title" "$message" # Notify screen sessions. for scrname in $(screen -ls | sed -ne 's/^\t\([^\t]*\)\t.*/\1/p') do screen -S $scrname -X wall "$title: $message" done ----8<---- It should be executable and placed in your $PATH. On Debian/Ubuntu you'll need the libnotify-bin and screen packages. Customize appt-display-duration, appt-display-interval and appt-message-warning-time to your liking, then run: ----8<---- (appt-activate +1) (bh/org-agenda-to-appt) ----8<---- HTH, -- Ivan Vilata i Balaguer -- http://elvil.net/