I am trying to port the Task Overview of the starter kit from @Bassmann to advanced queries:
{{query (and (task TODO DOING LATER NOW IN-PROGRESS) (priority A))}}
{{query (and (task TODO DOING LATER NOW IN-PROGRESS) (priority B))}}
{{query (and (task TODO DOING LATER NOW IN-PROGRESS WAIT WAITING) (priority C))}}
{{query (and (task TODO NOW LATER DOING IN-PROGRESS) (not (priority A B C)))}}
The simple ones, which filter only the task and a single priorty, were no problem. But I got stuck at two points:
-
How can I ‘translate’
(not (priority A B C))
?
-
In the simple query the page name is at the top, in the advanced query not.
Could somebody help me please with the ‘translation’?
Here is my solution for the first code block:
#+BEGIN_QUERY
{:title [:h2 "🔨 Priorty A Tasks - Do now"]
:query [:find (pull ?h [*])
:where
[?h :block/marker ?marker]
[(contains? #{"TODO" "DOING" "LATER" "NOW" "IN-PROGRESS"} ?marker)]
[?h :block/priority "A"]]
:result-transform (fn [result]
(sort-by (fn [h]
(get h :block/priority "Z")) result))
:group-by-page? false
:collapsed? false}
#+END_QUERY