From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Calendar-like view of the org-agenda Date: Thu, 07 Jul 2011 17:32:44 +0200 Message-ID: <87tyay6r8j.fsf@gnu.org> References: <87pqlu5quz.fsf@gnu.org> <87zkky48ol.wl%markert.michael@googlemail.com> <87tyb2qs39.fsf@isil.kanru.info> <8762nigeuk.wl%markert.michael@googlemail.com> <8739iklkgq.fsf@grumps.lan> <878vsbube7.fsf@member.fsf.org> <19988.11619.3400.87930@gazelle.local> <20110707044758.A52F913C56D@vps1.kiwanami.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:56382) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeqZ9-0003kO-Mn for emacs-orgmode@gnu.org; Thu, 07 Jul 2011 11:32:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QeqZ7-0000cy-MG for emacs-orgmode@gnu.org; Thu, 07 Jul 2011 11:32:35 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:64110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeqZ6-0000cf-Td for emacs-orgmode@gnu.org; Thu, 07 Jul 2011 11:32:33 -0400 Received: by wwf22 with SMTP id 22so864436wwf.30 for ; Thu, 07 Jul 2011 08:32:31 -0700 (PDT) In-Reply-To: <20110707044758.A52F913C56D@vps1.kiwanami.net> (SAKURAI Masashi's message of "Thu, 07 Jul 2011 13:47:57 +0900") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: SAKURAI Masashi Cc: tassilo@member.fsf.org, emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Hi Masashi, SAKURAI Masashi 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, --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Variable-for-faster-use-of-org-agenda-get-day-entrie.patch >From 7d54f5dc7cca22912d3dd9a8f6d00df7138942f3 Mon Sep 17 00:00:00 2001 From: Bastien Guerry 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 --=-=-= Content-Type: text/plain -- Bastien --=-=-=--