Hi Masashi,

SAKURAI Masashi <m.saku...@kiwanami.net> writes:

> Then, I use the function org-agenda-get-day-entries to get schedule
> items of the org-agenda-files. The function can receive some arguments
> to limit the tasks, but I didn't understand exactly.  

See the attached patch -- org-agenda-get-day-entries can take more
arguments like :scheduled :deadline to help reduce the size of listed
entries.  See the docstring of org-diary, which understands the same
list of arguments.

Hope this helps,

>From 7d54f5dc7cca22912d3dd9a8f6d00df7138942f3 Mon Sep 17 00:00:00 2001
From: Bastien Guerry <b...@altern.org>
Date: Thu, 7 Jul 2011 17:15:08 +0200
Subject: [PATCH] Variable for faster use of org-agenda-get-day-entries.

This is just an example.
---
 calfw-org.el |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/calfw-org.el b/calfw-org.el
index 99fe18e..ec43796 100644
--- a/calfw-org.el
+++ b/calfw-org.el
@@ -34,6 +34,9 @@
 (require 'org)
 (require 'org-agenda)
 
+(defvar cfw:org-agenda-schedule-args '(:scheduled)
+  "Default arguments for collecting agenda entries.")
+
 (defun cfw:org-collect-schedules-period (begin end)
   "[internal] Return org schedule items between BEGIN and END."
   (let ((org-agenda-prefix-format "")
@@ -43,7 +46,9 @@
           (loop for file in (org-agenda-files nil 'ifmode) append
                 (progn
                   (org-check-agenda-file file)
-                  (org-agenda-get-day-entries file date))))))
+                  (apply 'org-agenda-get-day-entries 
+			 file date 
+			 cfw:org-agenda-schedule-args))))))
 
 (defun cfw:org-onclick ()
   "Jump to the clicked org item."
-- 
1.7.5.2

-- 
 Bastien

Reply via email to