Add: (blocked) predicate
This commit is contained in:
parent
e5e9daab07
commit
6afe3be572
2 changed files with 6 additions and 0 deletions
|
|
@ -254,6 +254,7 @@ Arguments are listed next to predicate names, where applicable.
|
||||||
+ =tags-regexp (&rest regexps)= :: Return non-nil if current heading has tags matching one or more of ~REGEXPS~. Tests both inherited and local tags.
|
+ =tags-regexp (&rest regexps)= :: Return non-nil if current heading has tags matching one or more of ~REGEXPS~. Tests both inherited and local tags.
|
||||||
- Aliases: ~tags*~.
|
- Aliases: ~tags*~.
|
||||||
+ =todo (&optional keywords)= :: Return non-nil if current heading is a ~TODO~ item. With ~KEYWORDS~, return non-nil if its keyword is one of ~KEYWORDS~ (a list of strings). When called without arguments, only matches non-done tasks (i.e. does not match keywords in ~org-done-keywords~).
|
+ =todo (&optional keywords)= :: Return non-nil if current heading is a ~TODO~ item. With ~KEYWORDS~, return non-nil if its keyword is one of ~KEYWORDS~ (a list of strings). When called without arguments, only matches non-done tasks (i.e. does not match keywords in ~org-done-keywords~).
|
||||||
|
+ =blocked= :: Return non-nil if current heading is blocked.
|
||||||
|
|
||||||
*** Ancestor/descendant predicates
|
*** Ancestor/descendant predicates
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2377,6 +2377,11 @@ any planning prefix); it defaults to 0 (i.e. the whole regexp)."
|
||||||
(from (test-timestamps (ts<= from next-ts)))
|
(from (test-timestamps (ts<= from next-ts)))
|
||||||
(to (test-timestamps (ts<= next-ts to)))))))
|
(to (test-timestamps (ts<= next-ts to)))))))
|
||||||
|
|
||||||
|
(org-ql-defpred blocked ()
|
||||||
|
"Return non-nil if the entry is blocked."
|
||||||
|
:body
|
||||||
|
(org-entry-blocked-p))
|
||||||
|
|
||||||
;; NOTE: Predicates defined: stop deferring and define normalizer and
|
;; NOTE: Predicates defined: stop deferring and define normalizer and
|
||||||
;; preamble functions now. Reversing preserves the order in which
|
;; preamble functions now. Reversing preserves the order in which
|
||||||
;; they were defined. Generally it shouldn't matter, but it might...
|
;; they were defined. Generally it shouldn't matter, but it might...
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue