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)
;; TODO this function returns (nil nil nil) when there is no repeater,
;; which is weird and should be fixed
(if (car (org-ml-timestamp-get-repeater deadline)) t
(let ((this-epoch (-some->> deadline
(org-ml-timestamp-get-start-time) (org-ml-timestamp-get-start-time)
(org-ml-time-to-unixtime))) (org-ml-time-to-unixtime))))
(parent (plist-get ancestry :parent-deadline))) (< parent-epoch this-epoch))))))
(when (and this parent)
(< parent this)))))
(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