help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Email diary appointment reminders


From: Jeff Miller
Subject: Re: Email diary appointment reminders
Date: 26 Apr 2007 19:46:25 -0400
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Double Solitaire)

"Denis Bueno" <dbueno@gmail.com> writes:

> All-
> 
> I am using the diary to keep track of appointments, and in
> particular I use the fancy diary display, and appt-make-list as a
> diary-display-hook, so that I get reminders in emacs of upcoming
> appointments. But I want email reminders.
> 
> I'm a bit disappointed that there is nothing like
> "appt-display-hook", so that I could just email myself the
> appointment whenever emacs decides to display it. Is there a way to
> get this behavior?


Make use of appt-disp-window-function.  

Here's some code that does that.  It's pretty damn crude, but it works
and if nothing else, will get you started. :)

(defun appt-mail-appt (min-to-app new-time appt-msg)
  (compose-mail diary-mail-addr
                "Appt notification")
  (insert (concat min-to-app " minutes to appointment\n" appt-msg "\n"))
                (call-interactively (get mail-user-agent 'sendfunc)))

(defun jdm-appt-disp (min-to-app new-time appt-msg)
  (appt-mail-appt min-to-app new-time appt-msg)
  (appt-disp-window  min-to-app new-time appt-msg))


(setq appt-disp-window-function 'jdm-appt-disp)

-- 
Jeff Miller
jmiller@cablespeed.com


reply via email to

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