2

For my weekly report at work I use the org-mode (what else?). The custom agenda I am using is specified in my .emacs file as follows:

 '(org-agenda-custom-commands (quote (("W" "Weekly Meeting" 
   ((tags "TIMESTAMP_IA>=\"<-1w>\"/DONE" 
     ((org-agenda-sorting-strategy (quote (tag-up))))) 
    (tags "TIMESTAMP_IA>=\"<-1w>\"/ABANDONED" 
     ((org-agenda-sorting-strategy (quote (tag-up))))) 
    (tags "TIMESTAMP_IA>=\"<-1w>\"/FAILED" 
     ((org-agenda-sorting-strategy (quote (tag-up))))) 
    (todo "URGENT" ((org-agenda-sorting-strategy (quote (tag-up))))) 
    (todo "IN PROGRESS" ((org-agenda-sorting-strategy (quote (tag-up))))) 
    (todo "PENDING" ((org-agenda-sorting-strategy (quote (tag-up)))))) nil
    ("test.html")))))

Thus, I can see which tasks are urgent, which I am currently working upon and which tasks have been delegated to other people and are pending to be done. Furthermore, I can see what tasks have been done within the last week, which were abandoned and where I failed to deliver the desired result in the last week. (the default export is for different purposes)

Now to my question: As far as I experience it I can only see what I have done/abandoned/where I failed within the last 7 days. A more suitable view would be to see what I have done in the current calendar week. Does anybody know how to achieve this?

4

You can do this by using an agenda view instead of a todo view. Setting org-agenda-span to week and org-agenda-start-on-weekday to 0 will show the current week starting on Sunday. We can use org-agenda-skip-function to filter out any item not in a done state. By default this will hide everything unless we also set org-agenda-start-with-log-mode.

Putting it all together gives:

(add-to-list 'org-agenda-custom-commands
             '("W" "Weekly review"
               agenda ""
               ((org-agenda-span 'week)
                (org-agenda-start-on-weekday 0)
                (org-agenda-start-with-log-mode t)
                (org-agenda-skip-function
                 '(org-agenda-skip-entry-if 'nottodo 'done))
                 )))
  • That was nice except that it does not capture any repeat tasks that got done during the last week. Any workarounds there? – deshmukh Dec 1 '17 at 10:11
  • You'll have to turn on logging mode to record past activity and logging view to see it. Hit vl in the agenda. – erikstokes Dec 1 '17 at 13:24
  • my logging is on (#+STARTUP: hidestars indent logdone logrepeat logreschedule logredeadline logrefile logdrawer) and I tried vl in agenda. But no luck. I only see non-repeat tasks marked done – deshmukh Dec 1 '17 at 13:28
  • 1
    @deshmukh I changed the line with org-agenda-start-with-log-mode to (org-agenda-start-with-log-mode '(closed state clock)) and I see items that I closed, repeating items whose state changed, and items that received a clock. (Credit to this answer.) – miguelmorin Oct 7 at 17:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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