0

How can I retrieve, over an elisp list of files list-of-files, a view of all org-mode headers that (i) were CLOSED in between start and end such that (ii) these headers have a property P defined (that isn't nil)?

  • What do you mean by "a view of all org-mode headers". Do you want a list of headline titles matching these conditions? Please explain. – jagrg May 14 at 14:35
  • I meant an agenda view. Should have been more clear. – George May 14 at 21:06
0

Again you need a function to determine whether the closed timestamp is within the specified range. Now add the following to your agenda command to skip all entries not matching those conditions:

(org-agenda-skip-function
 (lambda ()
   (let ((ts (assoc-default "CLOSED" (org-entry-properties))))
     (unless (and (org-entry-get nil "P")
                  (timestamp-within-range-p "[2019-01-01]" "[2019-05-15]" ts))
       (save-excursion (outline-next-heading) (point))))))

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.