From: Bastien Guerry <Bastien.Guerry@ens.fr>
To: brianjiang@gdnt.com.cn
Cc: emacs-orgmode@gnu.org
Subject: Re: Is it any function similar to appoinment alert in the planner mode?
Date: Wed, 25 Jul 2007 21:15:42 +0200 [thread overview]
Message-ID: <87ps2gxpk1.fsf@bzg.ath.cx> (raw)
In-Reply-To: <63F95800EDD046419F17688AAFD41CCF01B77E1E@rnd-ex01.rnd.gdnt.local> (brianjiang@gdnt.com.cn's message of "Mon\, 23 Jul 2007 10\:24\:15 +0800")
<brianjiang@gdnt.com.cn> writes:
> I have just switched from Planner to Org recent and I find the Org mode
> fit my need more. But I failed to find a function that I used a lot in
> the Planner mode. The function is that a alert window is pop up (with a
> beep as well) when an appointment time is coming with in a few minutes.
> Is it such a function in current Org mode. If no, can we implement it?
Here is a solution that works for me.
(defun bzg-org-agenda-to-appt ()
"Activate appointments found in `org-agenda-files'."
(interactive)
(require 'org)
(let* ((today (org-date-to-gregorian
(time-to-days (current-time))))
(files org-agenda-files)
entries file)
(while (setq file (pop files))
(setq entries (append entries (org-agenda-get-day-entries
file today :timestamp))))
(mapc (lambda(x)
(let* ((event (org-trim (get-text-property 1 'txt x)))
(time (number-to-string
(get-text-property 1 'time-of-day x)))
(time-st (concat (substring time 0 2) ":"
(substring time 2 4))))
(appt-add time-st event))) entries)))
Of course you should have initialized appt and this could be hooked
somewhere. Let me know if it's okay for you.
Regards,
--
Bastien
next prev parent reply other threads:[~2007-07-25 19:15 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-17 19:22 Integration of Org mode and Gnus Georg C. F. Greve
2007-07-18 0:22 ` Jason F. McBrayer
2007-07-18 8:03 ` Georg C. F. Greve
2007-07-18 10:04 ` Bastien
2007-07-18 10:29 ` Georg C. F. Greve
2007-07-20 16:08 ` Integration of Org mode and mairix (was: ... and Gnus) Adam Spiers
2007-07-22 23:15 ` Integration of Org mode and mairix Georg C. F. Greve
2007-07-23 2:24 ` Is it any function similar to appoinment alert in the planner mode? brianjiang
2007-07-23 12:38 ` Bernt Hansen
2007-07-25 19:15 ` Bastien Guerry [this message]
2007-07-26 7:23 ` Bastien
2007-07-27 5:17 ` brianjiang
2007-08-07 0:05 ` Bastien
2007-08-07 17:13 ` Bastien
2007-08-21 2:37 ` william
2007-07-24 14:38 ` Integration of Org mode and mairix Bastien
2007-07-30 14:02 ` Georg C. F. Greve
2007-07-30 16:02 ` Bastien
2007-07-30 16:31 ` Leo
2007-07-30 17:26 ` Bastien
2007-08-05 1:32 ` Xiao-Yong Jin
2007-07-31 15:52 ` Jason F. McBrayer
2007-07-31 16:56 ` Xiao-Yong Jin
2007-07-31 17:19 ` Georg C. F. Greve
2007-08-05 1:40 ` Xiao-Yong Jin
2007-07-31 18:43 ` Bastien
2007-08-01 14:52 ` Jason F. McBrayer
2007-08-01 16:59 ` Bastien
2007-08-05 1:44 ` Xiao-Yong Jin
2007-08-05 10:20 ` Georg C. F. Greve
2007-08-07 17:54 ` Bastien
2007-08-10 6:56 ` Carsten Dominik
2007-08-14 11:29 ` Adam Spiers
2007-08-15 17:46 ` Carsten Dominik
2007-08-21 12:38 ` Carsten Dominik
2007-08-14 22:54 ` Steven Lumos
2007-08-15 17:46 ` Carsten Dominik
2007-08-16 18:48 ` Steven Lumos
2007-09-23 15:44 ` Georg C. F. Greve
2007-09-23 18:12 ` Carsten Dominik
2007-09-23 21:50 ` Georg C. F. Greve
2007-09-23 22:05 ` Carsten Dominik
2007-09-24 17:38 ` Georg C. F. Greve
2007-09-25 14:41 ` Carsten Dominik
2007-09-25 22:25 ` Georg C. F. Greve
2007-09-25 22:38 ` Carsten Dominik
2007-07-18 11:04 ` Integration of Org mode and Gnus Jason F. McBrayer
2007-07-18 12:01 ` Bastien
2007-07-18 12:57 ` Jason F. McBrayer
2007-07-18 13:08 ` Georg C. F. Greve
2007-07-18 15:39 ` Bastien
2007-07-18 19:39 ` Georg C. F. Greve
2007-07-18 22:06 ` Bastien
2007-07-19 15:29 ` Georg C. F. Greve
2007-07-18 21:54 ` Carsten Dominik
2007-07-19 15:41 ` Bastien
2007-07-18 10:20 ` Tassilo Horn
2007-07-18 10:35 ` Georg C. F. Greve
2007-07-18 11:55 ` Tassilo Horn
2007-07-18 12:25 ` Georg C. F. Greve
2007-07-18 12:54 ` Tassilo Horn
2007-07-18 13:18 ` Georg C. F. Greve
2007-07-18 13:32 ` Tassilo Horn
2007-07-18 0:55 ` Bastien
2007-07-18 7:53 ` Georg C. F. Greve
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ps2gxpk1.fsf@bzg.ath.cx \
--to=bastien.guerry@ens.fr \
--cc=brianjiang@gdnt.com.cn \
--cc=emacs-orgmode@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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.