Add: Dynamic block (property) column
This commit is contained in:
parent
2b21871a02
commit
cd95d10f05
4 changed files with 99 additions and 70 deletions
27
README.org
27
README.org
|
|
@ -404,29 +404,30 @@ Expands into a call to ~org-ql-select~ with the same arguments. For convenience
|
|||
Org QL provides a dynamic block that lists entries in the current document matching a query. In the header, these parameters are supported:
|
||||
|
||||
+ ~:query~: An Org QL query expression in either sexp or non-sexp form.
|
||||
+ ~:columns~ A list of columns, including ~heading~, ~todo~, ~priority~, ~deadline~, ~scheduled~.
|
||||
- Each column may also be specified as a list with the second element being a header string. For example, to abbreviate the priority column: ~(priority "P")~
|
||||
+ ~:columns~ A list of columns, including ~heading~, ~todo~, ~property~, ~priority~, ~deadline~, ~scheduled~.
|
||||
- Each column may also be specified as a list with the second element being a header string. For example, to abbreviate the priority column: ~(priority "P")~.
|
||||
- For certain columns, like =property=, arguments may be passed by specifying the column type itself as a list. For example, to display a column showing the values of a ~property~ named ~milestone~, with the header being abbreviated to ~M~: ~((property "milestone") "M")~.
|
||||
+ ~:sort~ One or a list of Org QL sorting methods (see ~org-ql-select~).
|
||||
+ ~:take~ Optionally take a number of results from the front (a positive number) or the end (a negative number) of the results.
|
||||
+ ~:ts-format~ Optional format string used to format timestamp-based columns.
|
||||
|
||||
The heading column is formatted as a link to the heading (not shown in the following example).
|
||||
|
||||
For example, this dynamic block shows the first seven headings that are to-do items with priority A or B, sorted by deadline then priority, with certain columns and timestamp format:
|
||||
For example, this dynamic block shows the first seven headings that are to-do items with priority A or B, sorted by deadline then priority, with certain columns (including the value of the =agenda-group= property with a custom header) and timestamp format:
|
||||
|
||||
# NOTE: These results are edited manually because the Org links don't display well in the Info manual.
|
||||
|
||||
#+BEGIN_SRC org
|
||||
,#+BEGIN: org-ql :query "todo: priority:A,B" :columns (todo (priority "P") deadline heading) :sort (deadline priority) :take 7 :ts-format "%Y-%m-%d %H:%M"
|
||||
| Todo | P | Deadline | Heading |
|
||||
|------+---+------------------+---------------------------------------|
|
||||
| TODO | A | 2017-07-07 00:00 | Take over the world |
|
||||
| TODO | B | 2017-07-10 00:00 | Renew membership in supervillain club |
|
||||
| TODO | A | 2017-07-15 00:00 | Take over the universe |
|
||||
| TODO | B | 2017-07-21 00:00 | Internet |
|
||||
| TODO | A | 2017-08-01 00:00 | Spaceship lease |
|
||||
| TODO | A | | Skype with president of Antarctica |
|
||||
| TODO | B | | Take over Mars |
|
||||
,#+BEGIN: org-ql :query "todo: priority:A,B" :columns (todo (priority "P") ((property "agenda-group") "Group") deadline heading) :sort (deadline priority) :take 7 :ts-format "%Y-%m-%d %H:%M"
|
||||
| Todo | P | Group | Deadline | Heading |
|
||||
|------+---+-------+------------------+---------------------------------------|
|
||||
| TODO | A | | 2017-07-07 00:00 | Take over the world |
|
||||
| TODO | B | | 2017-07-10 00:00 | Renew membership in supervillain club |
|
||||
| TODO | A | plans | 2017-07-15 00:00 | Take over the universe |
|
||||
| TODO | B | | 2017-07-21 00:00 | Internet |
|
||||
| TODO | A | bills | 2017-08-01 00:00 | Spaceship lease |
|
||||
| TODO | A | | | Skype with president of Antarctica |
|
||||
| TODO | B | | | Take over Mars |
|
||||
,#+END:
|
||||
#+END_SRC
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue