From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: tea-time? Date: Thu, 30 Jul 2009 11:56:53 +0100 Message-ID: <87y6q6qw0a.wl%ucecesf@ucl.ac.uk> References: <871vpr6ky5.fsf@online.de> <87ab4f6ja9.fsf@kassiopeya.MSHEIMNETZ> <20524da70907162056h22637e0byee429770336b73de@mail.gmail.com> <8763drn567.fsf@bzg.ath.cx> <20524da70907251249q19f6775cob0d9bc66ed0a5d71@mail.gmail.com> <87ljmc9zn8.fsf@bzg.ath.cx> <20524da70907251714u6df5b9e4x498269578911ab4@mail.gmail.com> <87d47n9sfb.fsf@bzg.ath.cx> <20524da70907291030q11737210lab5966b66a01a7a@mail.gmail.com> <87eirzcnr0.fsf@bzg.ath.cx> <20524da70907291445p49c13fd9rcf77ddce4aa1e7b7@mail.gmail.com> <8979.1248906559@alphaville.usa.hp.com> Reply-To: Eric S Fraga Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MWTK1-0000ys-3z for emacs-orgmode@gnu.org; Thu, 30 Jul 2009 06:57:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MWTJw-0000xW-5A for emacs-orgmode@gnu.org; Thu, 30 Jul 2009 06:57:16 -0400 Received: from [199.232.76.173] (port=41715 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWTJv-0000xG-St for emacs-orgmode@gnu.org; Thu, 30 Jul 2009 06:57:11 -0400 Received: from vscane-c.ucl.ac.uk ([144.82.108.43]:34002) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MWTJv-0008Cj-AI for emacs-orgmode@gnu.org; Thu, 30 Jul 2009 06:57:11 -0400 In-Reply-To: <8979.1248906559@alphaville.usa.hp.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: nicholas.dokos@hp.com Cc: Bastien , emacs-orgmode@gnu.org, henry atting At Wed, 29 Jul 2009 18:29:19 -0400, Nick Dokos wrote: > > Samuel Wales wrote: > > > Hi Bastien, > > > > I did not realize that appt could not be used. > > > > On 2009-07-29, Bastien wrote: > > > Please provide more information on how you tried it. > > > > It works now. I pulled in the interim, but I don't know if that's the > > reason. I tried it twice, so I don't think I missed the notification. > > > > However, the notification is in the minibuffer / echo area, and can > > easily be unnoticed if you are typing, as it goes away immediately. Samuel, you could investigate the linking of appt appointment notifications with external display tools, such as libnotify and osd methods. An example is given by Richard Riley in this message in the mailing list archives: http://article.gmane.org/gmane.emacs.orgmode/8235 I use something similar and following is a code extract from my .emacs based on some of Richard's and Nick's codes: --8<---------------cut here---------------start------------->8--- ;; and from RichardRiley's entry: http://www.emacswiki.org/emacs/OrgMode-OSD ;; and from Nick Dokos: http://article.gmane.org/gmane.emacs.orgmode/5271 (require 'appt) (defun rgr/xml-escape (s) (setq s (replace-regexp-in-string "'" "'" (replace-regexp-in-string "\"" """ (replace-regexp-in-string "&" "&" (replace-regexp-in-string "<" "<" (replace-regexp-in-string ">" ">" s))))))) (when window-system (defun rgr/osd-display (id msg &optional delay vattrib hattrib font) "Display a message msg using OSD. Currently requires gnome-osd-client" (unless vattrib (setq vattrib "top")) (unless hattrib (setq hattrib "right")) (unless delay (setq delay 5000)) (unless font (setq font "Arial 12")) (save-window-excursion (shell-command (format "gnome-osd-client -f \"%s\"" id font delay vattrib hattrib (rgr/xml-escape msg) )))) (defun esf/notification-display (msg min-to-app new-time) (save-window-excursion (shell-command (format "notify-send -t 0 -i /home/ucecesf/s/share/emacs-icon.xpm 'Agenda' \"In %s minutes:\n%s\"" min-to-app msg)))) ) (when window-system (setq appt-display-format 'window) (defun org-osd-display (min-to-app new-time msg) ; (rgr/osd-display msg msg -1 "center" "left" "Deja Vu Sans 20") (esf/notification-display msg min-to-app new-time) ; (message (format "executing notify-send %s minutes with message %s" min-to-app msg)) ) (setq appt-disp-window-function (function org-osd-display)) ;; Run once, activate and schedule refresh (run-at-time nil 3600 'org-agenda-to-appt) (appt-activate t)) (setq appt-time-msg-list nil) (org-agenda-to-appt) (defadvice org-agenda-redo (after org-agenda-redo-add-appts) "Pressing `r' on the agenda will also add appointments." (progn (setq appt-time-msg-list nil) (org-agenda-to-appt))) (ad-activate 'org-agenda-redo) --8<---------------cut here---------------end--------------->8--- This code uses the notification system built-in to Gnome/Kde/et al. and pops up a little window. Of course, this assumes you are using X windows. If you're using MS, I don't have anything to help you unfortunately. eric