I want to add a last-reviewed date for some headings.
And in org agenda view, I want to filter outer the headings that have not been reviewed for some days.
What's the org tools/functions/setup that are involved here?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityI want to add a last-reviewed date for some headings.
And in org agenda view, I want to filter outer the headings that have not been reviewed for some days.
What's the org tools/functions/setup that are involved here?
You can store the review date as an org-mode timestamp in a property, say LAST_REVIEW
. To help input them, you can use org-property-set-functions-alist
to give function that will be called when setting the property with C-c C-x p
:
(add-to-list 'org-property-set-functions-alist
'("LAST_REVIEW" . (lambda (&rest args)
(format "[%s]"
(org-read-date nil nil nil
"Last Reviewed on")
))))
(Here I'm using an inactive timestampe. Change "[%s]" to "<%s>" if you prefer active.)
You can query properties in the agenda view. For example the query LAST_REVIEW<"<-1m>"
Will find entries whose LAST_REVIEW
property is older than 1 month. You can save it in a custom agenda view:
(add-to-list 'org-agenda-custom-commands
'("r" "Items to review"
tags "LAST_REVIEW<\"<-1m>\""
))