You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/Note: This command supports both sexp queries and [[#non-sexp-query-syntax][non-sexp queries]]./
@@ -139,6 +138,11 @@ Show a sparse tree for ~QUERY~ in ~BUFFER~ and return number of results. The tr
139
138
~QUERY~ is an ~org-ql~ query sexp (quoted, since this is a function). ~BUFFER~ defaults to the current buffer. When ~KEEP-PREVIOUS~ is non-nil (interactively, with prefix), the outline is not reset to the overview state before finding matches, which allows stacking calls to this command. Runs ~org-occur-hook~ after making the sparse tree.
An =org-ql= query is a lisp form which may contain arbitrary lisp forms, as well as certain built-in predicates. It is byte-compiled into a predicate function which is tested with point on each heading in an Org buffer; when it returns non-nil, the heading matches the query.
144
148
@@ -147,9 +151,6 @@ An =org-ql= query is a lisp form which may contain arbitrary lisp forms, as well
147
151
+ Standard numeric comparator function symbols (~<~, ~<=~, ~>~, ~>=~, ~=~ ) need not be quoted when passed as an argument to predicates which accept them. The resemblance to infix notation is coincidental.
148
152
149
153
*** Non-sexp query syntax
150
-
:PROPERTIES:
151
-
:TOC: ignore
152
-
:END:
153
154
154
155
The command =org-ql-search= also accepts, and the command =helm-org-ql= only accepts, an alternative, non-sexp query syntax. The syntax is simple, and a few examples of queries in both syntaxes should suffice. By default, when multiple predicates are used, they are combined with boolean =and=.
155
156
@@ -170,9 +171,6 @@ The command =org-ql-search= also accepts, and the command =helm-org-ql= only acc
170
171
Note that the =priority= predicate does not support comparators in the non-sexp syntax, so multiple priorities should be passed instead, as seen in the last example.
171
172
172
173
*** Predicates
173
-
:PROPERTIES:
174
-
:TOC: ignore
175
-
:END:
176
174
177
175
Arguments are listed next to predicate names, where applicable.
178
176
@@ -204,9 +202,6 @@ Arguments are listed next to predicate names, where applicable.
204
202
+ =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~).
205
203
206
204
*** Date/time predicates
207
-
:PROPERTIES:
208
-
:TOC: ignore
209
-
:END:
210
205
211
206
All of these predicates take optional keyword arguments ~:from~, ~:to:~, and ~:on~:
212
207
@@ -237,6 +232,13 @@ The following predicates, in addition to the keyword arguments, can also take a
0 commit comments