unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Jeff Miller <jmiller@cablespeed.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Email diary appointment reminders
Date: 26 Apr 2007 19:46:25 -0400	[thread overview]
Message-ID: <m3647ibsxa.fsf@athlon.localdomain> (raw)
In-Reply-To: mailman.2549.1177595717.7795.help-gnu-emacs@gnu.org

"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	other threads:[~2007-04-26 23:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.2549.1177595717.7795.help-gnu-emacs@gnu.org>
2007-04-26 23:46 ` Jeff Miller [this message]
2007-05-01  1:17   ` Email diary appointment reminders Denis Bueno
2007-04-26 13:48 Denis Bueno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3647ibsxa.fsf@athlon.localdomain \
    --to=jmiller@cablespeed.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).