From 4fe5fe5b5dfb46f32f14595c033c5be818a2bf3f Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Mon, 9 May 2022 22:28:06 -0400 Subject: [PATCH] ENH inform user of their idiocy when assigning a repeate to an EPG --- local/lib/org-x/org-x-dag.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/local/lib/org-x/org-x-dag.el b/local/lib/org-x/org-x-dag.el index e46dfb0..aa44ba6 100644 --- a/local/lib/org-x/org-x-dag.el +++ b/local/lib/org-x/org-x-dag.el @@ -1458,9 +1458,12 @@ deadline (eg via epoch time) or if it has a repeater." `((:lifetime (lambda (id) (org-x-dag-ns-is-leaf-p ,adjlist id))) (:endpoint)) (lambda (id this-h res) - (-let (((&alist :lifetime l) res) - (d (org-x-dag-adjlist-id-planning adjlist :deadline id))) - (ht-set this-h id (either :right `(:committed ,l :deadline ,d))) + (-let* (((&alist :lifetime l) res) + (d (org-x-dag-adjlist-id-planning adjlist :deadline id)) + (ns (if (org-ml-timestamp-get-repeater d) + (either :left "EPG has deadline with repeater") + (either :right `(:committed ,l :deadline ,d))))) + (ht-set this-h id ns) (org-x-dag-ht-add-links id ht-l :fulfilled l)))))) (defun org-x-dag-ht-get-maybe (htbl id key)