ENH remove deadline from epg buffer status
This commit is contained in:
parent
0cf3695f06
commit
be46904cc3
|
@ -898,33 +898,18 @@ used for optimization."
|
||||||
((-some->> it-planning (org-ml-get-property :scheduled))
|
((-some->> it-planning (org-ml-get-property :scheduled))
|
||||||
(either :left "EPGs cannot be scheduled"))
|
(either :left "EPGs cannot be scheduled"))
|
||||||
((equal it-todo org-x-kw-todo)
|
((equal it-todo org-x-kw-todo)
|
||||||
(let ((dead (-some->> it-planning (org-ml-get-property :deadline))))
|
(org-x-dag-bs-fold-children child-bss `(:active)
|
||||||
(org-x-dag-bs-fold-children child-bss `(:active ,dead)
|
|
||||||
(->> (pcase `(,acc ,it)
|
(->> (pcase `(,acc ,it)
|
||||||
(`((:active ,_) (:active ,_)) nil)
|
(`((:active) (:active)) nil)
|
||||||
(`(,_ (:active ,_)) t)
|
(`(,_ (:active)) t)
|
||||||
(`((:active ,_) ,_) nil))
|
(`((:active) ,_) nil))
|
||||||
(either :right))
|
(either :right))
|
||||||
nil
|
nil
|
||||||
(pcase it
|
(pcase it
|
||||||
(`(:active ,c-dead)
|
('(:active)
|
||||||
;; TODO I might want to enforce the same precision here like I do
|
(either :right '(:active)))
|
||||||
;; for iterators
|
|
||||||
(let ((c-epoch (-some->> c-dead
|
|
||||||
(org-ml-timestamp-get-start-time)
|
|
||||||
(org-ml-time-to-unixtime)))
|
|
||||||
(p-epoch (-some->> dead
|
|
||||||
(org-ml-timestamp-get-start-time)
|
|
||||||
(org-ml-time-to-unixtime))))
|
|
||||||
(cond
|
|
||||||
((and c-epoch p-epoch (<= c-epoch p-epoch))
|
|
||||||
(either :right `(:active ,dead)))
|
|
||||||
((not dead)
|
|
||||||
(either :right `(:active ,c-dead)))
|
|
||||||
(t
|
|
||||||
(either :left "Child deadlines must be before parent deadlines")))))
|
|
||||||
(_
|
(_
|
||||||
(either :left "Active EPGs must have at least one active child"))))))
|
(either :left "Active EPGs must have at least one active child")))))
|
||||||
(t
|
(t
|
||||||
(org-x-dag-bs-error-kw "Endpoint goal" it-todo)))))
|
(org-x-dag-bs-error-kw "Endpoint goal" it-todo)))))
|
||||||
|
|
||||||
|
@ -2564,8 +2549,8 @@ FUTURE-LIMIT in a list."
|
||||||
(-let (((&plist :planned p :fulfilled f)
|
(-let (((&plist :planned p :fulfilled f)
|
||||||
(either-from-right ns nil)))
|
(either-from-right ns nil)))
|
||||||
(mk-item it :lifetime p f nil))))
|
(mk-item it :lifetime p f nil))))
|
||||||
;; TODO not sure how I want to handle deadlines yet here
|
;; TODO need to grab deadlines from the network status (when done)
|
||||||
(`(:endpoint :active ,_)
|
(`(:endpoint :active)
|
||||||
(-when-let (ns (org-x-dag-id->ns it))
|
(-when-let (ns (org-x-dag-id->ns it))
|
||||||
(-let (((&plist :planned p :fulfilled f :committed c)
|
(-let (((&plist :planned p :fulfilled f :committed c)
|
||||||
(either-from-right ns nil)))
|
(either-from-right ns nil)))
|
||||||
|
@ -3736,11 +3721,8 @@ FUTURE-LIMIT in a list."
|
||||||
(format-comptime "task" comptime))
|
(format-comptime "task" comptime))
|
||||||
(`(:sp-task :task-active ,_)
|
(`(:sp-task :task-active ,_)
|
||||||
"Active Task")
|
"Active Task")
|
||||||
(`(:endpoint :active ,dead)
|
(`(:endpoint :active)
|
||||||
(->> (if dead (->> (org-ml-to-trimmed-string dead)
|
"Active Endpoint Goal")
|
||||||
(format "deadline: %s"))
|
|
||||||
"no deadline")
|
|
||||||
(format "Active with %s")))
|
|
||||||
(`(:sp-iter :iter-active ,_)
|
(`(:sp-iter :iter-active ,_)
|
||||||
"Active Iterator")
|
"Active Iterator")
|
||||||
(`(:sp-iter :iter-empty)
|
(`(:sp-iter :iter-empty)
|
||||||
|
|
Loading…
Reference in New Issue