Add: Dynamic block (property) column

This commit is contained in:
Adam Porter 2020-11-12 04:55:43 -06:00
parent 2b21871a02
commit cd95d10f05
4 changed files with 99 additions and 70 deletions

View file

@ -730,10 +730,15 @@ 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.
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")
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
@ -746,18 +751,19 @@ 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:
with certain columns (including the value of the agenda-group property
with a custom header) and timestamp format:
#+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:

@ -1289,29 +1295,29 @@ Node: Functions / Macros19755
Node: Agenda-like views20010
Node: Listing / acting-on results21415
Node: Dynamic block26017
Node: Links28180
Node: Tips28867
Node: Changelog29185
Node: 05-pre29824
Node: 04631063
Node: 04531466
Node: 04431825
Node: 04332182
Node: 04232377
Node: 04132536
Node: 0432775
Node: 03236706
Node: 03137083
Node: 0337280
Node: 02340255
Node: 02240483
Node: 02140751
Node: 0240950
Node: 0144985
Node: Notes45086
Node: Comparison with Org Agenda searches45248
Node: org-sidebar46120
Node: License46399
Node: Links28715
Node: Tips29402
Node: Changelog29720
Node: 05-pre30359
Node: 04631598
Node: 04532001
Node: 04432360
Node: 04332717
Node: 04232912
Node: 04133071
Node: 0433310
Node: 03237241
Node: 03137618
Node: 0337815
Node: 02340790
Node: 02241018
Node: 02141286
Node: 0241485
Node: 0145520
Node: Notes45621
Node: Comparison with Org Agenda searches45783
Node: org-sidebar46655
Node: License46934

End Tag Table