Skip to content

Commit c4f9a58

Browse files
committedJan 10, 2020
Docs: Improve ToCs
1 parent 1f79632 commit c4f9a58

File tree

2 files changed

+92
-85
lines changed

2 files changed

+92
-85
lines changed
 

‎README.org

+39-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

@@ -57,22 +60,13 @@ Installing with [[https://framagit.org/steckerhalter/quelpa][Quelpa]] is easy:
5760
#+END_SRC
5861

5962
* Usage
63+
:CONTENTS:
64+
- [[#commands][Commands]]
65+
- [[#queries][Queries]]
66+
- [[#functions--macros][Functions / Macros]]
67+
:END:
6068

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)
69+
# These links work on GitHub's Org renderer but not in Org.
7670

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

@@ -84,6 +78,16 @@ Lisp code examples are in [[examples.org]].
8478
:TOC: ignore-children
8579
:END:
8680

81+
+ *Showing an agenda-like view:*
82+
- [[#org-ql-search][org-ql-search]] (command)
83+
- [[#org-ql-view][org-ql-view]] (command)
84+
- [[#org-ql-view-sidebar][org-ql-view-sidebar]] (command)
85+
- [[#org-ql-view-recent-items][org-ql-view-recent-items]] (command)
86+
+ *Showing a tree in a buffer:*
87+
- [[#org-ql-sparse-tree][org-ql-sparse-tree]] (command)
88+
+ *Showing results with Helm*:
89+
- [[#helm-org-ql][helm-org-ql]] (command)
90+
8791
*** org-ql-search
8892

8993
/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
139143
~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.
140144

141145
** Queries
146+
:CONTENTS:
147+
- [[#non-sexp-query-syntax][Non-sexp query syntax]]
148+
- [[#predicates][Predicates]]
149+
- [[#datetime-predicates][Date/time predicates]]
150+
:END:
142151

143152
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.
144153

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

149158
*** Non-sexp query syntax
150-
:PROPERTIES:
151-
:TOC: ignore
152-
:END:
153159

154160
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=.
155161

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

172178
*** Predicates
173-
:PROPERTIES:
174-
:TOC: ignore
175-
:END:
176179

177180
Arguments are listed next to predicate names, where applicable.
178181

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

206209
*** Date/time predicates
207-
:PROPERTIES:
208-
:TOC: ignore
209-
:END:
210210

211211
All of these predicates take optional keyword arguments ~:from~, ~:to:~, and ~:on~:
212212

@@ -237,6 +237,13 @@ The following predicates, in addition to the keyword arguments, can also take a
237237
:TOC: ignore-children
238238
:END:
239239

240+
- [[#agenda-like-views][Agenda-like views]]
241+
- [[#function-org-ql-block][Function: org-ql-block]]
242+
- [[#listing--acting-on-results][Listing / acting-on results]]
243+
- [[#function-org-ql-select][Function: org-ql-select]]
244+
- [[#function-org-ql-query][Function: org-ql-query]]
245+
- [[#macro-org-ql][Macro: org-ql]]
246+
240247
*** Agenda-like views
241248

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

‎org-ql.info

+53-53
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,22 +146,7 @@ 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-
149+
• • •
164150
Feedback on these APIs is welcome. Eventually, after being tested
165151
and polished, they will be considered stable.
166152

@@ -178,6 +164,16 @@ File: README.info, Node: Commands, Next: Queries, Up: Usage
178164
4.1 Commands
179165
============
180166

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

183179
* org-ql-search::
@@ -298,10 +294,11 @@ File: README.info, Node: Queries, Next: Functions / Macros, Prev: Commands,
298294
4.2 Queries
299295
===========
300296

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

306303
*Notes:*
307304
• Bare strings like ‘"string"’ are automatically converted to
@@ -511,6 +508,9 @@ File: README.info, Node: Functions / Macros, Prev: Queries, Up: Usage
511508
4.3 Functions / Macros
512509
======================
513510

511+
512+
• •
513+
• • •
514514
* Menu:
515515

516516
* Agenda-like views::
@@ -1006,38 +1006,38 @@ GPLv3
10061006
Tag Table:
10071007
Node: Top225
10081008
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
1009+
Node: Screenshots1541
1010+
Node: Installation1659
1011+
Node: Quelpa2297
1012+
Node: Usage2740
1013+
Node: Commands3064
1014+
Node: org-ql-search3537
1015+
Node: helm-org-ql5185
1016+
Node: org-ql-view5597
1017+
Node: org-ql-view-sidebar5795
1018+
Node: org-ql-view-recent-items6151
1019+
Node: org-ql-sparse-tree6635
1020+
Node: Queries7435
1021+
Node: Non-sexp query syntax8296
1022+
Node: Predicates9995
1023+
Node: Date/time predicates15157
1024+
Node: Functions / Macros17792
1025+
Node: Agenda-like views18025
1026+
Node: Listing / acting-on results19430
1027+
Node: Changelog24032
1028+
Node: 04-pre24569
1029+
Node: 03226584
1030+
Node: 03126965
1031+
Node: 0327160
1032+
Node: 02330133
1033+
Node: 02230359
1034+
Node: 02130625
1035+
Node: 0230822
1036+
Node: 0134855
1037+
Node: Notes34954
1038+
Node: Comparison with Org Agenda searches35116
1039+
Node: org-sidebar35987
1040+
Node: License36266
10411041

10421042
End Tag Table
10431043

0 commit comments

Comments
 (0)
Please sign in to comment.