FIX incorrect deadline function

This commit is contained in:
Nathan Dwarshuis 2022-05-09 22:51:28 -04:00
parent 4fe5fe5b5d
commit 2a1485edb8
1 changed files with 9 additions and 7 deletions

View File

@ -745,13 +745,15 @@ used for optimization."
This can happen if DEADLINE is literally after the ancestral This can happen if DEADLINE is literally after the ancestral
deadline (eg via epoch time) or if it has a repeater." deadline (eg via epoch time) or if it has a repeater."
(if (org-ml-timestamp-get-repeater deadline) t (let ((parent-epoch (plist-get ancestry :parent-deadline)))
(let ((this (-some->> deadline (when (and deadline parent-epoch)
(org-ml-timestamp-get-start-time) ;; TODO this function returns (nil nil nil) when there is no repeater,
(org-ml-time-to-unixtime))) ;; which is weird and should be fixed
(parent (plist-get ancestry :parent-deadline))) (if (car (org-ml-timestamp-get-repeater deadline)) t
(when (and this parent) (let ((this-epoch (-some->> deadline
(< parent this))))) (org-ml-timestamp-get-start-time)
(org-ml-time-to-unixtime))))
(< parent-epoch this-epoch))))))
(defun org-x-dag-bs-action-project-inner (node-data ancestry child-bss) (defun org-x-dag-bs-action-project-inner (node-data ancestry child-bss)
(cl-flet (cl-flet