0

Is there an existing function that indicates if an org entry is contained in an ordered list?

I am writing a hook that changes the next item in a list from TODO to NEXT. I only want the entry to change when it is in an ordered list. In the snippet below, changing Task A of A to DONE will trigger Task B of A to change its todo tag to NEXT. However, changing Task A of B will not trigger Task B of B to change its todo tag.

* TODO Project A
  :PROPERTIES:
  :ORDERED: t
  :END:
  ** NEXT Task A of A
  ** TODO Task B of A
* TODO Project B
  ** NEXT Task A of B
  ** TODO Task B of B

Is there a function that will tell me that Task B of A is in an ordered list when point is on Task B of A?

1 Answer 1

1

Function: org-entry-get pom property &optional inherit

Get value of PROPERTY for entry at point-or-marker POM.

By default, this only looks at properties defined locally in the entry.

If INHERIT is non-nil and the entry does not have the property, then also check higher levels of the hierarchy.

If INHERIT is the symbol selective, use inheritance if and only if the setting of org-use-property-inheritance >selects PROPERTY for inheritance.

https://orgmode.org/manual/Using-the-property-API.html

org-entry-get does the trick as long as the optional property inherit is set

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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