Add: Predicates outline-path, outline-path-segment
This commit is contained in:
parent
8d680a8e79
commit
c06e5518eb
3 changed files with 96 additions and 0 deletions
|
|
@ -178,6 +178,10 @@ Arguments are listed next to predicate names, where applicable.
|
|||
+ ~habit~ :: Return non-nil if entry is a habit.
|
||||
+ ~heading (&rest regexps)~ :: Return non-nil if current entry's heading matches all ~REGEXPS~ (regexp strings).
|
||||
+ ~level (level-or-comparator &optional level)~ :: Return non-nil if current heading's outline level matches arguments. The following forms are accepted: ~(level NUMBER)~: Matches if heading level is ~NUMBER~. ~(level NUMBER NUMBER)~: Matches if heading level is equal to or between NUMBERs. ~(level COMPARATOR NUMBER)~: Matches if heading level compares to ~NUMBER~ with ~COMPARATOR~. ~COMPARATOR~ may be ~<~, ~<=~, ~>~, or ~>=~.
|
||||
+ =outline-path (&rest strings)= :: Return non-nil if current node's outline path matches all of =STRINGS=. Each string may appear as a substring in any part of the node's outline path. For example, the path =Food/Fruits/Grapes= would match ~(olp "Fruit" "Grape")~.
|
||||
- Aliases: =olp=.
|
||||
+ =outline-path-segment (&rest strings)= :: Return non-nil if current node's outline path matches =STRINGS=. Matches =STRINGS= as a contiguous segment of the outline path. Each string is compared as a substring. For example the path =Food/Fruits/Grapes= would match ~(olps "Fruit" "Grape")~ but not ~(olps "Food" "Grape")~.
|
||||
- Aliases: =olps=.
|
||||
+ =path (&rest regexps)= :: Return non-nil if current heading's buffer's filename path matches any of =REGEXPS= (regexp strings). Without arguments, return non-nil if buffer is file-backed.
|
||||
+ ~priority (&optional comparator-or-priority priority)~ :: Return non-nil if current heading has a certain priority. ~COMPARATOR-OR-PRIORITY~ should be either a comparator function, like ~<=~, or a priority string, like "A" (in which case (~=~ will be the comparator). If ~COMPARATOR-OR-PRIORITY~ is a comparator, ~PRIORITY~ should be a priority string. If both arguments are nil, return non-nil if heading has any defined priority.
|
||||
+ ~property (property &optional value)~ :: Return non-nil if current entry has ~PROPERTY~ (a string), and optionally ~VALUE~ (a string). Note that property inheritance is currently /not/ enabled for this predicate. If you need to test with inheritance, you could use a custom predicate form, like ~(org-entry-get (point) "PROPERTY" 'inherit)~.
|
||||
|
|
@ -365,6 +369,9 @@ Expands into a call to ~org-ql-select~ with the same arguments. For convenience
|
|||
|
||||
** 0.4-pre
|
||||
|
||||
*Added*
|
||||
+ Predicates =outline-path= (alias =olp=) and =outline-path-segment= (alias =olps=).
|
||||
|
||||
*Internal*
|
||||
+ Added generic node data cache to speed up recursive, tree-based queries.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue