16

Is it possible to ask org mode to report a list of TODO items that I worked on over a period of time?

We can assume that for each Todo entry I have a time tag, e.g. <2014-03-13 Thu 17:04>

2 Answers 2

16

A quick way is to look at the logbook in the Agenda.

You can look at the agenda (see Agenda Views in Org Mode docs). Move the agenda to the time period you want - day, week, month, year. Put it in logbook mode (via the 'l' key, described in section 10.5 Commands in the agenda buffer). This will show for that time period which tasks you worked on and when.

You can also use a clock table (see section 8.4.2 The clock table) to get a detailed report where you can set all the details of what you are interested in.

(Note: the section heading numbers I refer to are in Org-mode version 8.2.5h - your version may differ, but those sections will still be there)

1
  • You may want to see completed tasks in agenda when they were closed by setting (setq org-agenda-start-with-log-mode t). I decided to keep it visible all the time it, it keeps the motivation high, which helps closing even more tasks.
    – Navidot
    Sep 3, 2020 at 22:11
10

I use these agenda views to create daily, weekly and monthly reviews. Everything with a time stamp in the given period is listed, even archived stuff. It also adds a clock table to the bottom and will export to to html files when you export your agenda views (with C-c a e).

;; define "R" as the prefix key for reviewing what happened in various
;; time periods
(add-to-list 'org-agenda-custom-commands
             '("R" . "Review" )
             )

;; Common settings for all reviews
(setq efs/org-agenda-review-settings
      '((org-agenda-files '("~/org/notes.org"
                            "~/org/projects.org"
                            ))
        (org-agenda-show-all-dates t)
        (org-agenda-start-with-log-mode t)
        (org-agenda-start-with-clockreport-mode t)
        (org-agenda-archives-mode t)
        ;; I don't care if an entry was archived
        (org-agenda-hide-tags-regexp
         (concat org-agenda-hide-tags-regexp
                 "\\|ARCHIVE"))
      ))
;; Show the agenda with the log turn on, the clock table show and
;; archived entries shown.  These commands are all the same exept for
;; the time period.
(add-to-list 'org-agenda-custom-commands
             `("Rw" "Week in review"
                agenda ""
                ;; agenda settings
                ,(append
                  efs/org-agenda-review-settings
                  '((org-agenda-span 'week)
                    (org-agenda-start-on-weekday 0)
                    (org-agenda-overriding-header "Week in Review"))
                  )
                ("~/org/review/week.html")
                ))


(add-to-list 'org-agenda-custom-commands
             `("Rd" "Day in review"
                agenda ""
                ;; agenda settings
                ,(append
                  efs/org-agenda-review-settings
                  '((org-agenda-span 'day)
                    (org-agenda-overriding-header "Day in Review"))
                  )
                ("~/org/review/day.html")
                ))

(add-to-list 'org-agenda-custom-commands
             `("Rm" "Month in review"
                agenda ""
                ;; agenda settings
                ,(append
                  efs/org-agenda-review-settings
                  '((org-agenda-span 'month)
                    (org-agenda-start-day "01")
                    (org-read-date-prefer-future nil)
                    (org-agenda-overriding-header "Month in Review"))
                  )
                ("~/org/review/month.html")
                ))
1
  • This answer is great, and almost what I am looking for! I want a view that shows activity in a certain two-week period (a sprint). My idea is to have an .el file somewhere with the sprint start and end dates in it (as elisp variables? or defconst?) and then something that looks very much like your code above would use these variables to generate a sprint view. I have one working already, but DONE tasks are only visible when the SCHEDULED date is today. How could I achieve that? Apr 26, 2022 at 9:22

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.