ADD weekly plan buffer status function

This commit is contained in:
Nathan Dwarshuis 2022-03-24 19:51:42 -04:00
parent 56323df94a
commit a2494f2370
1 changed files with 23 additions and 0 deletions

View File

@ -1888,6 +1888,22 @@ used for optimization."
(t (t
(org-x-dag-bs-error-kw "QTP" it-todo)))))) (org-x-dag-bs-error-kw "QTP" it-todo))))))
(defun org-x-dag-wkp-bs-inner (node-data)
(org-x-dag-bs-action-with-closed node-data "weekly plan"
`(:complete ,it-comptime)
(org-x-dag-bs :valid `(:complete ,it-comptime))
(-let (((sched dead) (-some->> it-planning
(org-ml-get-properties '(:scheduled :deadline)))))
(cond
(sched
(org-x-dag-bs :error "WKPs cannot be scheduled"))
(dead
(org-x-dag-bs :error "WKPs cannot be deadlined"))
((equal it-todo org-x-kw-todo)
(org-x-dag-bs :valid `(:active)))
(t
(org-x-dag-bs-error-kw "WKP" it-todo))))))
(defun org-x-dag-with-treetop-error (tree) (defun org-x-dag-with-treetop-error (tree)
(declare (indent 3)) (declare (indent 3))
(-let* (((node . children) tree) (-let* (((node . children) tree)
@ -1918,6 +1934,13 @@ used for optimization."
`(:quarterly ,it))) `(:quarterly ,it)))
`(,n ,@ns)))) `(,n ,@ns))))
(defun org-x-dag-wkp-bs (tree)
(-let (((n ns) (org-x-dag-with-treetop tree #'org-x-dag-wkp-bs-inner)))
(--map (org-x-dag-node-fmap it
(org-x-dag-bs-fmap it
`(:quarterly ,it)))
`(,n ,@ns))))
(defun org-x-dag-get-file-nodes (file group) (defun org-x-dag-get-file-nodes (file group)
(let* ((meta (list :file file (let* ((meta (list :file file
:group group :group group