Orgmode: A report of tasks that are done within the week

霸气de小男生 提交于 2019-11-27 06:07:18

问题


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>


回答1:


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)




回答2:


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


来源:https://stackoverflow.com/questions/22394394/orgmode-a-report-of-tasks-that-are-done-within-the-week

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!