From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Guerry Subject: Re: Is it any function similar to appoinment alert in the planner mode? Date: Wed, 25 Jul 2007 21:15:42 +0200 Message-ID: <87ps2gxpk1.fsf@bzg.ath.cx> References: <63F95800EDD046419F17688AAFD41CCF01B77E1E@rnd-ex01.rnd.gdnt.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IDmKs-0006ec-2n for emacs-orgmode@gnu.org; Wed, 25 Jul 2007 15:15:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IDmKr-0006eQ-2g for emacs-orgmode@gnu.org; Wed, 25 Jul 2007 15:15:49 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IDmKq-0006eN-U7 for emacs-orgmode@gnu.org; Wed, 25 Jul 2007 15:15:48 -0400 Received: from hu-out-0506.google.com ([72.14.214.226]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IDmKq-0003FP-Ig for emacs-orgmode@gnu.org; Wed, 25 Jul 2007 15:15:48 -0400 Received: by hu-out-0506.google.com with SMTP id 23so1898524huc for ; Wed, 25 Jul 2007 12:15:47 -0700 (PDT) In-Reply-To: <63F95800EDD046419F17688AAFD41CCF01B77E1E@rnd-ex01.rnd.gdnt.local> (brianjiang@gdnt.com.cn's message of "Mon\, 23 Jul 2007 10\:24\:15 +0800") 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: brianjiang@gdnt.com.cn Cc: emacs-orgmode@gnu.org 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