Skip to content

Commit 492ed77

Browse files
committed
Docs: Improve ToCs
1 parent 1f79632 commit 492ed77

File tree

2 files changed

+88
-87
lines changed

2 files changed

+88
-87
lines changed

README.org

+34-32
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,17 @@ It includes three libraries: The =org-ql= library is flexible and may be used as
1414
:PROPERTIES:
1515
:TOC: this
1616
:END:
17-
- [[#screenshots][Screenshots]]
18-
- [[#installation][Installation]]
19-
- [[#usage][Usage]]
20-
- [[#commands][Commands]]
21-
- [[#queries][Queries]]
22-
- [[#functions--macros][Functions / Macros]]
23-
- [[#changelog][Changelog]]
24-
- [[#notes][Notes]]
17+
- [[#screenshots][Screenshots]]
18+
- [[#installation][Installation]]
19+
- [[#usage][Usage]]
20+
- [[#commands][Commands]]
21+
- [[#queries][Queries]]
22+
- [[#non-sexp-query-syntax][Non-sexp query syntax]]
23+
- [[#predicates][Predicates]]
24+
- [[#datetime-predicates][Date/time predicates]]
25+
- [[#functions--macros][Functions / Macros]]
26+
- [[#changelog][Changelog]]
27+
- [[#notes][Notes]]
2528

2629
* Screenshots
2730

@@ -58,21 +61,7 @@ Installing with [[https://framagit.org/steckerhalter/quelpa][Quelpa]] is easy:
5861

5962
* Usage
6063

61-
These commands and functions are included:
62-
63-
+ *Showing an agenda-like view:*
64-
- ~org-ql-search~ (command)
65-
- ~org-ql-view~ (command)
66-
- ~org-ql-view-sidebar~ (command)
67-
- ~org-ql-block~ (agenda block function)
68-
+ *Showing a tree in a buffer:*
69-
- ~org-ql-sparse-tree~ (command)
70-
+ *Showing results with Helm*:
71-
- ~helm-org-ql~ (command)
72-
+ *Returning a list of matches or acting on them:*
73-
- ~org-ql~ (macro)
74-
- ~org-ql-select~ (function)
75-
- ~org-ql-query~ (function)
64+
# These links work on GitHub's Org renderer but not in Org.
7665

7766
Feedback on these APIs is welcome. Eventually, after being tested and polished, they will be considered stable.
7867

@@ -84,6 +73,16 @@ Lisp code examples are in [[examples.org]].
8473
:TOC: ignore-children
8574
:END:
8675

76+
+ *Showing an agenda-like view:*
77+
- [[#org-ql-search][org-ql-search]] (command)
78+
- [[#org-ql-view][org-ql-view]] (command)
79+
- [[#org-ql-view-sidebar][org-ql-view-sidebar]] (command)
80+
- [[#org-ql-view-recent-items][org-ql-view-recent-items]] (command)
81+
+ *Showing a tree in a buffer:*
82+
- [[#org-ql-sparse-tree][org-ql-sparse-tree]] (command)
83+
+ *Showing results with Helm*:
84+
- [[#helm-org-ql][helm-org-ql]] (command)
85+
8786
*** org-ql-search
8887

8988
/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
139138
~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.
140139

141140
** Queries
141+
:CONTENTS:
142+
- [[#non-sexp-query-syntax][Non-sexp query syntax]]
143+
- [[#predicates][Predicates]]
144+
- [[#datetime-predicates][Date/time predicates]]
145+
:END:
142146

143147
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.
144148

@@ -147,9 +151,6 @@ An =org-ql= query is a lisp form which may contain arbitrary lisp forms, as well
147151
+ 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.
148152

149153
*** Non-sexp query syntax
150-
:PROPERTIES:
151-
:TOC: ignore
152-
:END:
153154

154155
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=.
155156

@@ -170,9 +171,6 @@ The command =org-ql-search= also accepts, and the command =helm-org-ql= only acc
170171
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.
171172

172173
*** Predicates
173-
:PROPERTIES:
174-
:TOC: ignore
175-
:END:
176174

177175
Arguments are listed next to predicate names, where applicable.
178176

@@ -204,9 +202,6 @@ Arguments are listed next to predicate names, where applicable.
204202
+ =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~).
205203

206204
*** Date/time predicates
207-
:PROPERTIES:
208-
:TOC: ignore
209-
:END:
210205

211206
All of these predicates take optional keyword arguments ~:from~, ~:to:~, and ~:on~:
212207

@@ -237,6 +232,13 @@ The following predicates, in addition to the keyword arguments, can also take a
237232
:TOC: ignore-children
238233
:END:
239234

235+
- [[#agenda-like-views][Agenda-like views]]
236+
- [[#function-org-ql-block][Function: org-ql-block]]
237+
- [[#listing--acting-on-results][Listing / acting-on results]]
238+
- [[#function-org-ql-select][Function: org-ql-select]]
239+
- [[#function-org-ql-query][Function: org-ql-query]]
240+
- [[#macro-org-ql][Macro: org-ql]]
241+
240242
*** Agenda-like views
241243

242244
**** Function: ~org-ql-block~

org-ql.info

+54-55
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ File: README.info, Node: Contents, Next: Screenshots, Prev: Top, Up: Top
9393
**********
9494

9595
• • •
96-
• • • • •
96+
• •
97+
• • • • • •
9798

9899
File: README.info, Node: Screenshots, Next: Installation, Prev: Contents, Up: Top
99100

@@ -145,24 +146,8 @@ File: README.info, Node: Usage, Next: Changelog, Prev: Installation, Up: Top
145146
4 Usage
146147
*******
147148

148-
These commands and functions are included:
149-
150-
• *Showing an agenda-like view:*
151-
• ‘org-ql-search’ (command)
152-
• ‘org-ql-view’ (command)
153-
• ‘org-ql-view-sidebar’ (command)
154-
• ‘org-ql-block’ (agenda block function)
155-
• *Showing a tree in a buffer:*
156-
• ‘org-ql-sparse-tree’ (command)
157-
• *Showing results with Helm*:
158-
• ‘helm-org-ql’ (command)
159-
• *Returning a list of matches or acting on them:*
160-
• ‘org-ql’ (macro)
161-
• ‘org-ql-select’ (function)
162-
• ‘org-ql-query’ (function)
163-
164-
Feedback on these APIs is welcome. Eventually, after being tested
165-
and polished, they will be considered stable.
149+
Feedback on these APIs is welcome. Eventually, after being tested and
150+
polished, they will be considered stable.
166151

167152
Lisp code examples are in .
168153

@@ -178,6 +163,16 @@ File: README.info, Node: Commands, Next: Queries, Up: Usage
178163
4.1 Commands
179164
============
180165

166+
• *Showing an agenda-like view:*
167+
• (command)
168+
• (command)
169+
• (command)
170+
• (command)
171+
• *Showing a tree in a buffer:*
172+
• (command)
173+
• *Showing results with Helm*:
174+
• (command)
175+
181176
* Menu:
182177

183178
* org-ql-search::
@@ -298,10 +293,11 @@ File: README.info, Node: Queries, Next: Functions / Macros, Prev: Commands,
298293
4.2 Queries
299294
===========
300295

301-
An org-ql query is a lisp form which may contain arbitrary lisp forms,
302-
as well as certain built-in predicates. It is byte-compiled into a
303-
predicate function which is tested with point on each heading in an Org
304-
buffer; when it returns non-nil, the heading matches the query.
296+
• • •
297+
An org-ql query is a lisp form which may contain arbitrary lisp
298+
forms, as well as certain built-in predicates. It is byte-compiled into
299+
a predicate function which is tested with point on each heading in an
300+
Org buffer; when it returns non-nil, the heading matches the query.
305301

306302
*Notes:*
307303
• Bare strings like ‘"string"’ are automatically converted to
@@ -511,6 +507,9 @@ File: README.info, Node: Functions / Macros, Prev: Queries, Up: Usage
511507
4.3 Functions / Macros
512508
======================
513509

510+
511+
• •
512+
• • •
514513
* Menu:
515514

516515
* Agenda-like views::
@@ -1006,38 +1005,38 @@ GPLv3
10061005
Tag Table:
10071006
Node: Top225
10081007
Node: Contents1367
1009-
Node: Screenshots1515
1010-
Node: Installation1633
1011-
Node: Quelpa2271
1012-
Node: Usage2714
1013-
Node: Commands3624
1014-
Node: org-ql-search3853
1015-
Node: helm-org-ql5501
1016-
Node: org-ql-view5913
1017-
Node: org-ql-view-sidebar6111
1018-
Node: org-ql-view-recent-items6467
1019-
Node: org-ql-sparse-tree6951
1020-
Node: Queries7751
1021-
Node: Non-sexp query syntax8593
1022-
Node: Predicates10292
1023-
Node: Date/time predicates15454
1024-
Node: Functions / Macros18089
1025-
Node: Agenda-like views18276
1026-
Node: Listing / acting-on results19681
1027-
Node: Changelog24283
1028-
Node: 04-pre24820
1029-
Node: 03226835
1030-
Node: 03127216
1031-
Node: 0327411
1032-
Node: 02330384
1033-
Node: 02230610
1034-
Node: 02130876
1035-
Node: 0231073
1036-
Node: 0135106
1037-
Node: Notes35205
1038-
Node: Comparison with Org Agenda searches35367
1039-
Node: org-sidebar36238
1040-
Node: License36517
1008+
Node: Screenshots1541
1009+
Node: Installation1659
1010+
Node: Quelpa2297
1011+
Node: Usage2740
1012+
Node: Commands3045
1013+
Node: org-ql-search3518
1014+
Node: helm-org-ql5166
1015+
Node: org-ql-view5578
1016+
Node: org-ql-view-sidebar5776
1017+
Node: org-ql-view-recent-items6132
1018+
Node: org-ql-sparse-tree6616
1019+
Node: Queries7416
1020+
Node: Non-sexp query syntax8277
1021+
Node: Predicates9976
1022+
Node: Date/time predicates15138
1023+
Node: Functions / Macros17773
1024+
Node: Agenda-like views18006
1025+
Node: Listing / acting-on results19411
1026+
Node: Changelog24013
1027+
Node: 04-pre24550
1028+
Node: 03226565
1029+
Node: 03126946
1030+
Node: 0327141
1031+
Node: 02330114
1032+
Node: 02230340
1033+
Node: 02130606
1034+
Node: 0230803
1035+
Node: 0134836
1036+
Node: Notes34935
1037+
Node: Comparison with Org Agenda searches35097
1038+
Node: org-sidebar35968
1039+
Node: License36247
10411040

10421041
End Tag Table
10431042

0 commit comments

Comments
 (0)