"Loris Bennett" <loris.benn...@fu-berlin.de> writes:
#+begin_src emacs-lisp
(add-to-list 'org-agenda-custom-commands
'("." "Completed today"
((todo ""
((org-agenda-skip-function
'(org-agenda-skip-entry-if 'notregexp
(format-time-string "CLOSED:
\\[%Y-%m-%d")))))
(org-agenda-sorting-strategy
'(priority-down)))))) t)
#+end_src
However, more useful to me would be "last week", so what
approach should I take for that?
I get pretty decent mileage out of this command (note that it's a
tags search, not a todo keyword search.) (add-to-list
'org-agenda-custom-commands '("." "Closed this week." tags
"CLOSED>\"<-1w>\"" ((org-agenda-sorting-strategy
'(priority-down))))) Though now I've got a related question.
One thing I'd like to do is run a function over every item that
was closed this past week. For sake of example, let's say I've
added a property ":mood: 5" to several closed items and I'd like
to delete it (but only from the closed items; I'm not necessarily
deleting the property globally.)
To do this I tried pulling all the closed items, visiting them in
turn, and calling (org-delete-property "mood"). But I got stuck
pulling all the closed items, because `org-tags-view' and friends
all build an agenda as a side effect.
Is my best bet simply re-implementing the parts of `org-tags-view'
that I need?
Or is there a more common way to use the org machinery to work
with items in lisp code?
Thanks!
--
Trevor Murphy
GnuPG Key: 0x83881C0A