From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Is it any function similar to appoinment alert in the planner mode? Date: Tue, 07 Aug 2007 02:05:41 +0200 Message-ID: <87odhk9pka.fsf@bzg.ath.cx> References: <63F95800EDD046419F17688AAFD41CCF01B77E1E@rnd-ex01.rnd.gdnt.local> <87ps2gxpk1.fsf@bzg.ath.cx> <87vec7aars.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IICaR-0004do-AX for emacs-orgmode@gnu.org; Mon, 06 Aug 2007 20:06:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IICaP-0004da-5m for emacs-orgmode@gnu.org; Mon, 06 Aug 2007 20:06:11 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IICaP-0004dX-0S for emacs-orgmode@gnu.org; Mon, 06 Aug 2007 20:06:09 -0400 Received: from hu-out-0506.google.com ([72.14.214.237]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IICaK-0001fz-Tl for emacs-orgmode@gnu.org; Mon, 06 Aug 2007 20:06:07 -0400 Received: by hu-out-0506.google.com with SMTP id 23so1286609huc for ; Mon, 06 Aug 2007 17:05:53 -0700 (PDT) In-Reply-To: <87vec7aars.fsf@bzg.ath.cx> (Bastien's message of "Thu\, 26 Jul 2007 09\:23\:35 +0200") 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: emacs-orgmode@gnu.org --=-=-= Bastien writes: >> Here is a solution that works for me. > > Er.. this one works better: Still another slightly improved version: --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline; filename=bzg-org-agenda-to-appt.el Content-Transfer-Encoding: 8bit ;; Get appointments from Org agenda files (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)))) (setq entries (delete entries nil)) (mapc (lambda(x) (let* ((event (org-trim (get-text-property 1 'txt x))) (timen (get-text-property 1 'time-of-day x)) (times (when (numberp timen) (number-to-string timen))) (times0 (when (string-match "\\([0-9]\\{1,2\\}\\)\\([0-9]\\{2\\}\\)" times) (concat (match-string 1 times) ":" (match-string 2 times))))) (when timen (appt-add times0 event)))) entries))) --=-=-= -- Bastien --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--