Docs: Improve ToCs
This commit is contained in:
parent
1f79632372
commit
c4f9a58fd6
2 changed files with 92 additions and 85 deletions
71
README.org
71
README.org
|
|
@ -14,14 +14,17 @@ It includes three libraries: The =org-ql= library is flexible and may be used as
|
|||
:PROPERTIES:
|
||||
:TOC: this
|
||||
:END:
|
||||
- [[#screenshots][Screenshots]]
|
||||
- [[#installation][Installation]]
|
||||
- [[#usage][Usage]]
|
||||
- [[#commands][Commands]]
|
||||
- [[#queries][Queries]]
|
||||
- [[#functions--macros][Functions / Macros]]
|
||||
- [[#changelog][Changelog]]
|
||||
- [[#notes][Notes]]
|
||||
- [[#screenshots][Screenshots]]
|
||||
- [[#installation][Installation]]
|
||||
- [[#usage][Usage]]
|
||||
- [[#commands][Commands]]
|
||||
- [[#queries][Queries]]
|
||||
- [[#non-sexp-query-syntax][Non-sexp query syntax]]
|
||||
- [[#predicates][Predicates]]
|
||||
- [[#datetime-predicates][Date/time predicates]]
|
||||
- [[#functions--macros][Functions / Macros]]
|
||||
- [[#changelog][Changelog]]
|
||||
- [[#notes][Notes]]
|
||||
|
||||
* Screenshots
|
||||
|
||||
|
|
@ -57,22 +60,13 @@ Installing with [[https://framagit.org/steckerhalter/quelpa][Quelpa]] is easy:
|
|||
#+END_SRC
|
||||
|
||||
* Usage
|
||||
:CONTENTS:
|
||||
- [[#commands][Commands]]
|
||||
- [[#queries][Queries]]
|
||||
- [[#functions--macros][Functions / Macros]]
|
||||
:END:
|
||||
|
||||
These commands and functions are included:
|
||||
|
||||
+ *Showing an agenda-like view:*
|
||||
- ~org-ql-search~ (command)
|
||||
- ~org-ql-view~ (command)
|
||||
- ~org-ql-view-sidebar~ (command)
|
||||
- ~org-ql-block~ (agenda block function)
|
||||
+ *Showing a tree in a buffer:*
|
||||
- ~org-ql-sparse-tree~ (command)
|
||||
+ *Showing results with Helm*:
|
||||
- ~helm-org-ql~ (command)
|
||||
+ *Returning a list of matches or acting on them:*
|
||||
- ~org-ql~ (macro)
|
||||
- ~org-ql-select~ (function)
|
||||
- ~org-ql-query~ (function)
|
||||
# These links work on GitHub's Org renderer but not in Org.
|
||||
|
||||
Feedback on these APIs is welcome. Eventually, after being tested and polished, they will be considered stable.
|
||||
|
||||
|
|
@ -84,6 +78,16 @@ Lisp code examples are in [[examples.org]].
|
|||
:TOC: ignore-children
|
||||
:END:
|
||||
|
||||
+ *Showing an agenda-like view:*
|
||||
- [[#org-ql-search][org-ql-search]] (command)
|
||||
- [[#org-ql-view][org-ql-view]] (command)
|
||||
- [[#org-ql-view-sidebar][org-ql-view-sidebar]] (command)
|
||||
- [[#org-ql-view-recent-items][org-ql-view-recent-items]] (command)
|
||||
+ *Showing a tree in a buffer:*
|
||||
- [[#org-ql-sparse-tree][org-ql-sparse-tree]] (command)
|
||||
+ *Showing results with Helm*:
|
||||
- [[#helm-org-ql][helm-org-ql]] (command)
|
||||
|
||||
*** org-ql-search
|
||||
|
||||
/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
|
|||
~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.
|
||||
|
||||
** Queries
|
||||
:CONTENTS:
|
||||
- [[#non-sexp-query-syntax][Non-sexp query syntax]]
|
||||
- [[#predicates][Predicates]]
|
||||
- [[#datetime-predicates][Date/time predicates]]
|
||||
:END:
|
||||
|
||||
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.
|
||||
|
||||
|
|
@ -147,9 +156,6 @@ An =org-ql= query is a lisp form which may contain arbitrary lisp forms, as well
|
|||
+ 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.
|
||||
|
||||
*** Non-sexp query syntax
|
||||
:PROPERTIES:
|
||||
:TOC: ignore
|
||||
:END:
|
||||
|
||||
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=.
|
||||
|
||||
|
|
@ -170,9 +176,6 @@ The command =org-ql-search= also accepts, and the command =helm-org-ql= only acc
|
|||
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.
|
||||
|
||||
*** Predicates
|
||||
:PROPERTIES:
|
||||
:TOC: ignore
|
||||
:END:
|
||||
|
||||
Arguments are listed next to predicate names, where applicable.
|
||||
|
||||
|
|
@ -204,9 +207,6 @@ Arguments are listed next to predicate names, where applicable.
|
|||
+ =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~).
|
||||
|
||||
*** Date/time predicates
|
||||
:PROPERTIES:
|
||||
:TOC: ignore
|
||||
:END:
|
||||
|
||||
All of these predicates take optional keyword arguments ~:from~, ~:to:~, and ~:on~:
|
||||
|
||||
|
|
@ -237,6 +237,13 @@ The following predicates, in addition to the keyword arguments, can also take a
|
|||
:TOC: ignore-children
|
||||
:END:
|
||||
|
||||
- [[#agenda-like-views][Agenda-like views]]
|
||||
- [[#function-org-ql-block][Function: org-ql-block]]
|
||||
- [[#listing--acting-on-results][Listing / acting-on results]]
|
||||
- [[#function-org-ql-select][Function: org-ql-select]]
|
||||
- [[#function-org-ql-query][Function: org-ql-query]]
|
||||
- [[#macro-org-ql][Macro: org-ql]]
|
||||
|
||||
*** Agenda-like views
|
||||
|
||||
**** Function: ~org-ql-block~
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue