Skip to content

How to add to the vulpea-project-p DONE ToDo states but not archived #137

Answered by d12frosted
DominikMendel asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @DominikMendel

You kind of answered your own question. Few things to note.

  1. (org-element-property :todo-type h) returns one of the 3 values: nil (when there is no TODO cookie), todo (when the task is not completed yet as per org-todo-keywords) and done (when the task is completed as per org-todo-keywords).
  2. You can also access tags via :tags property and check for ARCHIVE to be missing.

You can fetch it all together roughly like this:

(defun vulpea-project-p ()
  "Return non-nil if current buffer has any todo entry."
  (org-element-map
      (org-element-parse-buffer 'headline)
      'headline
    (lambda (h)
      (and (org-element-property :todo-type h)
           (not (seq-contains-p

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@DominikMendel
Comment options

@DominikMendel
Comment options

Answer selected by d12frosted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants