unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Email diary appointment reminders
@ 2007-04-26 13:48 Denis Bueno
  0 siblings, 0 replies; 3+ messages in thread
From: Denis Bueno @ 2007-04-26 13:48 UTC (permalink / raw)
  To: help-gnu-emacs

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?

-Denis

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Email diary appointment reminders
       [not found] <mailman.2549.1177595717.7795.help-gnu-emacs@gnu.org>
@ 2007-04-26 23:46 ` Jeff Miller
  2007-05-01  1:17   ` Denis Bueno
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Miller @ 2007-04-26 23:46 UTC (permalink / raw)
  To: help-gnu-emacs

"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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Email diary appointment reminders
  2007-04-26 23:46 ` Email diary appointment reminders Jeff Miller
@ 2007-05-01  1:17   ` Denis Bueno
  0 siblings, 0 replies; 3+ messages in thread
From: Denis Bueno @ 2007-05-01  1:17 UTC (permalink / raw)
  To: Jeff Miller; +Cc: help-gnu-emacs

On 26 Apr 2007 19:46:25 -0400, Jeff Miller <jmiller@cablespeed.com> wrote:
> "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)

Thanks; this works great!

-Denis

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-05-01  1:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.2549.1177595717.7795.help-gnu-emacs@gnu.org>
2007-04-26 23:46 ` Email diary appointment reminders Jeff Miller
2007-05-01  1:17   ` Denis Bueno
2007-04-26 13:48 Denis Bueno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).