emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* monthly report
@ 2007-05-25  1:41 Steven Lumos
  2007-05-25 13:29 ` Jason F. McBrayer
  2007-05-29 12:29 ` Carsten Dominik
  0 siblings, 2 replies; 8+ messages in thread
From: Steven Lumos @ 2007-05-25  1:41 UTC (permalink / raw)
  To: emacs-orgmode


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?

If not, any words of advice before I dive in?

Steve

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: monthly report
  2007-05-25  1:41 monthly report Steven Lumos
@ 2007-05-25 13:29 ` Jason F. McBrayer
  2007-05-29 12:29 ` Carsten Dominik
  1 sibling, 0 replies; 8+ messages in thread
From: Jason F. McBrayer @ 2007-05-25 13:29 UTC (permalink / raw)
  To: emacs-orgmode

Steven Lumos <steven@lumos.us> writes:

> 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?

This isn't /exactly/ what you want, but I use org's clocktable
feature (see the progress logging node in the info documentation) for
my monthly reports.  That's based on when you /worked on/ something,
rather than when you /closed/ it, though.

-- 
+-----------------------------------------------------------+
| Jason F. McBrayer                    jmcbray@carcosa.net  |
| If someone conquers a thousand times a thousand others in |
| battle, and someone else conquers himself, the latter one |
| is the greatest of all conquerors.  --- The Dhammapada    |

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: monthly report
  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
  1 sibling, 2 replies; 8+ messages in thread
From: Carsten Dominik @ 2007-05-29 12:29 UTC (permalink / raw)
  To: Steven Lumos; +Cc: emacs-orgmode


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?

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)))

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: monthly report
  2007-05-29 12:29 ` Carsten Dominik
@ 2007-05-30  0:30   ` Steven Lumos
  2009-03-17 19:38   ` Micah Anderson
  1 sibling, 0 replies; 8+ messages in thread
From: Steven Lumos @ 2007-05-30  0:30 UTC (permalink / raw)
  To: emacs-orgmode

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?
>
> 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)))

This is just right.  Thanks!

Steve

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: monthly report
  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
  1 sibling, 1 reply; 8+ messages in thread
From: Micah Anderson @ 2009-03-17 19:38 UTC (permalink / raw)
  To: emacs-orgmode


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.

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: monthly report
  2009-03-17 19:38   ` Micah Anderson
@ 2009-03-18  8:42     ` Carsten Dominik
  2009-03-18 14:57       ` Micah Anderson
  0 siblings, 1 reply; 8+ messages in thread
From: Carsten Dominik @ 2009-03-18  8:42 UTC (permalink / raw)
  To: Micah Anderson; +Cc: emacs-orgmode


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: monthly report
  2009-03-18  8:42     ` Carsten Dominik
@ 2009-03-18 14:57       ` Micah Anderson
  2009-03-19 10:13         ` Carsten Dominik
  0 siblings, 1 reply; 8+ messages in thread
From: Micah Anderson @ 2009-03-18 14:57 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 2279 bytes --]

* Carsten Dominik <dominik@science.uva.nl> [2009-03-18 04:42-0400]:
>
> On Mar 17, 2009, at 8:38 PM, Micah Anderson wrote:
>> 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?

[snip: lisp function (26 lines)]

>> 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?

Ok, I restarted emacs and tried again, and now I am not given this
mini-buffer message at all. On restart, I found an error in my .emacs,
which could have been causing this issue. Chalk that up to confused
internal state I guess.

However, org-closed-in-range still doesn't seem to be doing anything
interesting, as far as I can tell. It folded up my org file, but thats
about it.

Maybe there is a better way for me to get at what I want, and I just
haven't found it yet (I am pretty new at org) and debugging this might
not be the best thing to do if there is something better to solve my
need. I basically just need to, at the end of the week, produce a report
of what I've worked on for that week, both things I finished, but also
things that are still in progress. Including the time spent is useful
too. I can go into the agenda and hit 'R' to get a time-table at the end
of the page, but I need a more granual day-by-day breakdown (Monday:
4hrs, worked on X, Y and completed Z).

thanks for your response!
micah

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: monthly report
  2009-03-18 14:57       ` Micah Anderson
@ 2009-03-19 10:13         ` Carsten Dominik
  0 siblings, 0 replies; 8+ messages in thread
From: Carsten Dominik @ 2009-03-19 10:13 UTC (permalink / raw)
  To: Micah Anderson; +Cc: emacs-orgmode


On Mar 18, 2009, at 3:57 PM, Micah Anderson wrote:

> * Carsten Dominik <dominik@science.uva.nl> [2009-03-18 04:42-0400]:
>>
>> On Mar 17, 2009, at 8:38 PM, Micah Anderson wrote:
>>> 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?
>
> [snip: lisp function (26 lines)]
>
>>> 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?
>
> Ok, I restarted emacs and tried again, and now I am not given this
> mini-buffer message at all. On restart, I found an error in my .emacs,
> which could have been causing this issue. Chalk that up to confused
> internal state I guess.
>
> However, org-closed-in-range still doesn't seem to be doing anything
> interesting, as far as I can tell. It folded up my org file, but thats
> about it.

Do you have CLOSED: <....> timestamps in the buffer?
You do get these by setting

(setq org-log-done 'time)

or by doing

#+STARTUP: logdone

- Carsten

>
> Maybe there is a better way for me to get at what I want, and I just
> haven't found it yet (I am pretty new at org) and debugging this might
> not be the best thing to do if there is something better to solve my
> need. I basically just need to, at the end of the week, produce a  
> report
> of what I've worked on for that week, both things I finished, but also
> things that are still in progress. Including the time spent is useful
> too. I can go into the agenda and hit 'R' to get a time-table at the  
> end
> of the page, but I need a more granual day-by-day breakdown (Monday:
> 4hrs, worked on X, Y and completed Z).

You can configure the clock report to be delivered for days by
setting the

:step day

property in org-agenda-clock-report-parameter-plist


Or you can switch to a daily agenda (the "d") key
and look at the clock report day by day.

Pressing "l" or "C-u l" turns on the log info for days, showing
you what you did on a particular day, provided that you have
recorded that informtation by setting org-log-done, of by clocking time,
or by recording state changes.  All this is in the manual.

HTH

- Carsten


>
> thanks for your response!
> micah

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-03-19 16:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2009-03-18 14:57       ` Micah Anderson
2009-03-19 10:13         ` Carsten Dominik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).