From: Carsten Dominik <dominik@science.uva.nl>
To: Micah Anderson <micah@riseup.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: monthly report
Date: Wed, 18 Mar 2009 09:42:20 +0100 [thread overview]
Message-ID: <37A74413-AC81-4F69-A08D-FD1D0DB08AE0@uva.nl> (raw)
In-Reply-To: <87hc1sdjo8.fsf@pond.riseup.net>
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 <dominik@science.uva.nl> 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
next prev parent reply other threads:[~2009-03-18 8:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-25 1:41 monthly report Steven Lumos
2007-05-25 13:29 ` Jason F. McBrayer
2007-05-29 12:29 ` Carsten Dominik
2007-05-30 0:30 ` Steven Lumos
2009-03-17 19:38 ` Micah Anderson
2009-03-18 8:42 ` Carsten Dominik [this message]
2009-03-18 14:57 ` Micah Anderson
2009-03-19 10:13 ` Carsten Dominik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=37A74413-AC81-4F69-A08D-FD1D0DB08AE0@uva.nl \
--to=dominik@science.uva.nl \
--cc=emacs-orgmode@gnu.org \
--cc=micah@riseup.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.