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 +143,11 @@ Show a sparse tree for ~QUERY~ in ~BUFFER~ and return number of results. The tr
139
143
~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
153
@@ -147,9 +156,6 @@ An =org-ql= query is a lisp form which may contain arbitrary lisp forms, as well
147
156
+ 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
157
149
158
*** Non-sexp query syntax
150
-
:PROPERTIES:
151
-
:TOC: ignore
152
-
:END:
153
159
154
160
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
161
@@ -170,9 +176,6 @@ The command =org-ql-search= also accepts, and the command =helm-org-ql= only acc
170
176
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
177
172
178
*** Predicates
173
-
:PROPERTIES:
174
-
:TOC: ignore
175
-
:END:
176
179
177
180
Arguments are listed next to predicate names, where applicable.
178
181
@@ -204,9 +207,6 @@ Arguments are listed next to predicate names, where applicable.
204
207
+ =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
208
206
209
*** Date/time predicates
207
-
:PROPERTIES:
208
-
:TOC: ignore
209
-
:END:
210
210
211
211
All of these predicates take optional keyword arguments ~:from~, ~:to:~, and ~:on~:
212
212
@@ -237,6 +237,13 @@ The following predicates, in addition to the keyword arguments, can also take a
0 commit comments