emacs: refine org-ql based agenda views
This commit is contained in:
parent
379011e871
commit
a22631f67c
|
@ -293,7 +293,7 @@ The environment variable ~SSH_AUTH_SOCK~ needs to be set for git to work within
|
|||
(setq org-refile-targets `((,jc/agenda-files-all . (:maxlevel . 3))
|
||||
(,jc/spark-file . (:maxlevel . 2))
|
||||
(nil . (:maxlevel . 3)))
|
||||
org-refile-use-outline-path nil))
|
||||
org-refile-use-outline-path t))
|
||||
#+end_src
|
||||
|
||||
** Capture
|
||||
|
@ -583,81 +583,92 @@ See also [[id:18709859-c3db-4d0e-a4a0-e797b58a2e07][Capture templates]]
|
|||
|
||||
#+begin_src emacs-lisp
|
||||
(setq org-ql-views
|
||||
`(("Working: Contexts"
|
||||
:title "Tasks by context"
|
||||
:buffers-files org-agenda-files
|
||||
:query (and (not (or (done) (todo "ONHOLD" "WAITING" "DELEGATED")) )
|
||||
(not (scheduled :from tomorrow))
|
||||
(tags "email" "phone" "online"))
|
||||
:sort todo
|
||||
:super-groups ((:auto-tags t)))
|
||||
("Working: Kanban"
|
||||
:title "Kanban"
|
||||
:buffers-files org-agenda-files
|
||||
:query (and (todo "DOING" "HOT" "WARM" "COOL" "TODO" "WAITING")
|
||||
(not (or (scheduled :from tomorrow)
|
||||
(property "Project" "t")
|
||||
(children))))
|
||||
:super-groups org-super-agenda-groups)
|
||||
("Working: Focus"
|
||||
:title "Focus"
|
||||
:buffers-files org-agenda-files
|
||||
:query (and (todo "DOING" "HOT")
|
||||
(not (or (scheduled :from tomorrow)
|
||||
(property "Project" "t")
|
||||
(children))))
|
||||
:super-groups org-super-agenda-groups)
|
||||
("Working: People agendas"
|
||||
:title "Agendas"
|
||||
:buffers-files org-agenda-files
|
||||
:query (and (todo "DELEGATED" "WAITING" "DISCUSS")
|
||||
(tags "BlaM" "BluM" "RK"))
|
||||
:super-groups ((:auto-tags t)))
|
||||
("Process: Inbox"
|
||||
:buffers-files ,(f-expand "Todo/inbox.org" jc/notes-dir))
|
||||
("Review: Recently closed"
|
||||
:title "Closed in the last 2 weeks"
|
||||
:buffers-files ,(list jc/agenda-file-work jc/agenda-file-work-archive)
|
||||
:query (closed :from -14)
|
||||
:super-groups ((:auto-ts t)))
|
||||
("Review: Projects"
|
||||
:buffers-files org-agenda-files
|
||||
:query (and (todo)
|
||||
(or (tags "project")
|
||||
(children)))
|
||||
:super-groups ((:name "Progressing"
|
||||
:order 15
|
||||
:children ("TODO" "COOL" "WARM" "HOT" "DOING"))
|
||||
(:name "Discussion needed"
|
||||
:order 4
|
||||
:children ("DISCUSS"))
|
||||
(:name "Waiting"
|
||||
:order 10
|
||||
:children ("WAITING" "DELEGATED"))
|
||||
(:name "On hold"
|
||||
:order 10
|
||||
:children ("ONHOLD"))
|
||||
(:name "Stalled"
|
||||
:order 0
|
||||
:anything t)))
|
||||
("Review: Strategic areas"
|
||||
:buffers-files org-agenda-files
|
||||
:query (property "Track")
|
||||
:super-groups ((:name "Progressing"
|
||||
:order 5
|
||||
:children ("TODO" "COOL" "WARM" "HOT" "DOING"))
|
||||
(:name "Discussion needed"
|
||||
:order 4
|
||||
:children ("DISCUSS"))
|
||||
(:name "Waiting"
|
||||
:order 10
|
||||
:children ("WAITING" "DELEGATED"))
|
||||
(:name "On hold"
|
||||
:order 10
|
||||
:children ("ONHOLD"))
|
||||
(:name "Stalled"
|
||||
:order 0
|
||||
:anything t)))))
|
||||
(let ((kanban-query '(and (todo "DOING" "HOT" "WARM" "COOL" "TODO" "WAITING")
|
||||
(not (or (scheduled :from tomorrow)
|
||||
(property "Project" "t")
|
||||
(children))))))
|
||||
`(("Working: Contexts"
|
||||
:title "Tasks by context"
|
||||
:buffers-files org-agenda-files
|
||||
:query (and (not (or (done) (todo "ONHOLD" "WAITING" "DELEGATED")) )
|
||||
(not (scheduled :from tomorrow))
|
||||
(tags "email" "phone" "online"))
|
||||
:sort todo
|
||||
:super-groups ((:auto-tags t)))
|
||||
|
||||
("Kanban: work"
|
||||
:title "Kanban: work"
|
||||
:buffers-files (,jc/agenda-file-work)
|
||||
:query ,kanban-query
|
||||
:super-groups org-super-agenda-groups)
|
||||
("Kanban: home"
|
||||
:title "Kanban: home"
|
||||
:buffers-files (,jc/agenda-file-home)
|
||||
:query ,kanban-query
|
||||
:super-groups org-super-agenda-groups)
|
||||
|
||||
("Focus: work"
|
||||
:title "Focus"
|
||||
:buffers-files (,jc/agenda-file-work)
|
||||
:query (and (todo "DOING" "HOT")
|
||||
(not (or (scheduled :from tomorrow)
|
||||
(property "Project" "t")
|
||||
(children))))
|
||||
:super-groups org-super-agenda-groups)
|
||||
("Working: People agendas"
|
||||
:title "Agendas"
|
||||
:buffers-files (,jc/agenda-file-work)
|
||||
:query (and (todo "DELEGATED" "WAITING" "DISCUSS")
|
||||
(tags "BlaM" "BluM" "RK"))
|
||||
:super-groups ((:auto-tags t)))
|
||||
|
||||
("Process: Inbox"
|
||||
:buffers-files ,(f-expand "Todo/inbox.org" jc/notes-dir))
|
||||
|
||||
("Review: Recently closed"
|
||||
:title "Closed in the last 2 weeks"
|
||||
:buffers-files ,(list jc/agenda-file-work jc/agenda-file-work-archive)
|
||||
:query (closed :from -14)
|
||||
:super-groups ((:auto-ts t)))
|
||||
|
||||
("Review: Projects"
|
||||
:buffers-files org-agenda-files
|
||||
:query (and (todo)
|
||||
(or (tags "project")
|
||||
(children)))
|
||||
:super-groups ((:name "Progressing"
|
||||
:order 15
|
||||
:children ("TODO" "COOL" "WARM" "HOT" "DOING"))
|
||||
(:name "Discussion needed"
|
||||
:order 4
|
||||
:children ("DISCUSS"))
|
||||
(:name "Waiting"
|
||||
:order 10
|
||||
:children ("WAITING" "DELEGATED"))
|
||||
(:name "On hold"
|
||||
:order 10
|
||||
:children ("ONHOLD"))
|
||||
(:name "Stalled"
|
||||
:order 0
|
||||
:anything t)))
|
||||
("Review: Strategic areas"
|
||||
:buffers-files org-agenda-files
|
||||
:query (property "Track")
|
||||
:super-groups ((:name "Progressing"
|
||||
:order 5
|
||||
:children ("TODO" "COOL" "WARM" "HOT" "DOING"))
|
||||
(:name "Discussion needed"
|
||||
:order 4
|
||||
:children ("DISCUSS"))
|
||||
(:name "Waiting"
|
||||
:order 10
|
||||
:children ("WAITING" "DELEGATED"))
|
||||
(:name "On hold"
|
||||
:order 10
|
||||
:children ("ONHOLD"))
|
||||
(:name "Stalled"
|
||||
:order 0
|
||||
:anything t))))))
|
||||
|
||||
(map! :leader :desc "Org-ql views" :n "oq" #'org-ql-view)
|
||||
#+end_src
|
||||
|
@ -676,12 +687,15 @@ See also [[id:18709859-c3db-4d0e-a4a0-e797b58a2e07][Capture templates]]
|
|||
(org-ql-search (list jc/agenda-file-home) '(todo)
|
||||
:super-groups org-super-agenda-groups)
|
||||
"home tasks")
|
||||
("hk"
|
||||
(org-ql-view "Kanban: home")
|
||||
"home kanban")
|
||||
("wt"
|
||||
(org-ql-search (list jc/agenda-file-work) '(todo)
|
||||
:super-groups org-super-agenda-groups)
|
||||
"work tasks")
|
||||
("wk"
|
||||
(org-ql-view "Working: Kanban")
|
||||
(org-ql-view "Kanban: work")
|
||||
"work kanban"))
|
||||
|
||||
(map! :leader :n "oa" #'jc/agenda-views/body)
|
||||
|
|
Loading…
Reference in New Issue