From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: monthly report Date: Wed, 18 Mar 2009 09:42:20 +0100 Message-ID: <37A74413-AC81-4F69-A08D-FD1D0DB08AE0@uva.nl> References: <86ps4pbrxy.fsf@bitty.lumos.us> <7b72afe87a251d7615438346906a6f1f@science.uva.nl> <87hc1sdjo8.fsf@pond.riseup.net> Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LjrM4-0007u5-7O for emacs-orgmode@gnu.org; Wed, 18 Mar 2009 04:42:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LjrLy-0007sR-Ui for emacs-orgmode@gnu.org; Wed, 18 Mar 2009 04:42:27 -0400 Received: from [199.232.76.173] (port=42545 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LjrLy-0007sK-LA for emacs-orgmode@gnu.org; Wed, 18 Mar 2009 04:42:22 -0400 Received: from mail-ew0-f160.google.com ([209.85.219.160]:37205) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LjrLy-00025f-3a for emacs-orgmode@gnu.org; Wed, 18 Mar 2009 04:42:22 -0400 Received: by ewy4 with SMTP id 4so510001ewy.42 for ; Wed, 18 Mar 2009 01:42:21 -0700 (PDT) In-Reply-To: <87hc1sdjo8.fsf@pond.riseup.net> 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: Micah Anderson Cc: emacs-orgmode@gnu.org On Mar 17, 2009, at 8:38 PM, Micah Anderson wrote: > > Hi all, apologies for resurrecting an older thread, but I was > searching > for this very capability and found this post. > > Carsten Dominik writes: >> On May 25, 2007, at 3:41, Steven Lumos wrote: >> >>> Being yet another planner switcher, I'm used to using planner- >>> report- >>> generate to assist me with writing a monthly activity report. I >>> don't >>> need fine-grained time tracking, or even most of what planner- >>> report- >>> generate does--it would be ideal to get just a list of TODOs that >>> were >>> closed between two dates and then I'll look at it while I type a few >>> sentences in an email buffer. >>> >>> Is there already an easy way to "get a list" (I guess that a sparse >>> tree would be most convenient for me) of TODOs marked as closed >>> within >>> some date range? > > I have been trying to figure this one out myself. Thank goodness for > list archives! > >> You can use org-occur to create a tree with matches of CLOSED time >> stamps. >> And you can use the callback argument of org-occur to verify if a >> match is in a given time interval. Something like this: >> >> (defun org-closed-in-range () >> "Sparse treee of items closed in a certain time range." >> (interactive) >> ;; Get the time interval from the user. >> (let* ((time1 (time-to-seconds >> (org-read-date nil 'to-time nil "Starting date: "))) >> (time2 (time-to-seconds >> (org-read-date nil 'to-time nil "End date:"))) >> ;; callbakc function >> (callback (lambda () >> (let ((time >> (time-to-seconds >> (apply 'encode-time >> (org-parse-time-string >> (match-string 1)))))) >> ;; check if time in interval >> (and (>= time time1) (<= time time2)))))) >> ;; make tree, check each match with the callback >> (org-occur "CLOSED: +\\[\\(.*?\\)\\]" nil callback))) > > Ok, I tried this and I'm not sure what it did, if anything. I get the > mini-buffer saying, 'Specified time is not representable' I've tried > various date range possibilities, and can't get it to work. It seems that you are specifying the date in an invalid way. What are you typing when prompted for a date? - Carsten > > I did also change the '(org-occur "CLOSED: +\\[\\(.*?\\)\\]" nil > callback)))' to be instead '(org-occur "DONE +\\[\\(.*?\\)\\]" nil > callback)))' due to the way my org seems to represent finished items: > > ** DONE fix the apt puppet module to automatically add apt-keys, > publish that new repository and deploy > SCHEDULED: <2009-03-16 Mon> > - State "DONE" [2009-03-16 Mon 14:49] \\ > made this a lot nicer > CLOCK: [2009-03-16 Mon 14:21]--[2009-03-16 Mon 14:21] => 0:00 > [2009-03-16 Mon] > > As far as I can tell, I did not setup this format. I tried to change > the > (org-occur "CLOSED... to be "DONE..." instead, but no change here > either. > > Thanks for any help! > micah > > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode