ENH update status functions

This commit is contained in:
Nathan Dwarshuis 2022-06-05 12:47:32 -04:00
parent 4ae05ea339
commit cc1b881d40
1 changed files with 37 additions and 28 deletions

View File

@ -4569,14 +4569,12 @@ FUTURE-LIMIT in a list."
(-let* (((&plist :epoch e :canceledp c) comptime)
((y m d H M) (org-ml-unixtime-to-time-long e))
(verb (if c "Canceled" "Completed")))
(format-event verb what y m d H M))))
;; TODO this could show more detail if I wanted
(let ((ls (pcase bs-data
(`(:action . ,d)
(-let* (((&plist :ancestry a :local l) d)
(local-status
(pcase l
(`(:sp-proj :proj-active)
(format-event verb what y m d H M)))
(format-action-local-status
(local)
;; TODO eventually show nested scheduled timestamps
(pcase local
(`(:sp-proj :proj-active ,_)
"Active Project")
(`(:sp-proj :proj-wait)
"Waiting Project")
@ -4590,17 +4588,28 @@ FUTURE-LIMIT in a list."
(format-comptime "task" comptime))
(`(:sp-task :task-active ,_)
"Active Task")
(`(:sp-iter :iter-active ,_)
"Active Iterator")
(`(:sp-iter :iter-empty)
"Empty Iterator")
(`(:sp-iter :iter-complete ,comptime)
(format-comptime "iterator" comptime))
(`(:sp-subiter :si-active ,_)
"Active sub-iterator")
(`(:sp-subiter :si-complete ,comptime)
(format-comptime "sub-iterator" comptime))
(e (error "Unmatched pattern: %s" e))))
(`(:sp-iter :iter-empty :empty-complete ,comptime)
(format-comptime "empty iterator" comptime))
(`(:sp-iter :iter-empty :empty-active)
"Empty and active Iterator")
(`(:sp-iter :iter-nonempty :nonempty-complete ,comptime)
(format-comptime "nonempty iterator" comptime))
(`(:sp-iter :iter-nonempty :nonempty-active ,_)
"Nonempty and active iterator")
(`(:sp-subiter :si-proj :proj-complete ,comptime)
(format-comptime "sub-iterator project" comptime))
(`(:sp-subiter :si-task :task-complete ,comptime)
(format-comptime "sub-iterator task" comptime))
(`(:sp-subiter :si-proj :proj-active ,_)
"Active sub-iterator project")
(`(:sp-subiter :si-task :task-active ,_)
"Active sub-iterator task")
(e (error "Unmatched pattern: %s" e)))))
;; TODO this could show more detail if I wanted
(let ((ls (pcase bs-data
(`(:action . ,d)
(-let* (((&plist :ancestry a :local l) d)
(local-status (format-action-local-status l))
((&plist :canceled-parent-p c :held-parent-p h) a)
(ancestry-status (cond
((and c h) "Held/Canceled")