From 6d7f92dbbe12584e16dce89a176942dd5f5a6801 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Sun, 25 Aug 2024 21:47:16 -0400 Subject: [PATCH] FIX more stuff --- local/lib/org-x/org-x-dag.el | 8 ++++---- local/lib/org-x/org-x.el | 13 ++++++++----- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/local/lib/org-x/org-x-dag.el b/local/lib/org-x/org-x-dag.el index d30130a..b4abdcf 100644 --- a/local/lib/org-x/org-x-dag.el +++ b/local/lib/org-x/org-x-dag.el @@ -3681,9 +3681,9 @@ FUTURE-LIMIT in a list." (if ids (cons (org-x-dag-build-parent-link-drawer ids) children) children))) (defun org-x-dag-headline-get-parent-links (headline) - (->> headline - (org-ml-headline-get-contents (org-x-logbook-config)) - (org-x-dag-section-get-parent-links))) + (-some->> headline + (org-ml-headline-get-contents (org-x-logbook-config)) + (org-x-dag-section-get-parent-links))) (defun org-x-dag-headline-set-parent-links (ids headline) (org-ml-headline-map-contents* (org-x-logbook-config) @@ -3868,7 +3868,7 @@ FUTURE-LIMIT in a list." (org-x-dag-build-planning-id-headline title 4 paragraph ids)) (defun org-x-dag-build-dlp-headline (title paragraph ids datetime) - (let ((pl (org-ml-build-planning! :scheduled datetime))) + (let ((pl (list :scheduled datetime))) (->> (org-x-dag-build-planning-id-headline title 4 paragraph ids) (org-ml-headline-set-planning pl)))) diff --git a/local/lib/org-x/org-x.el b/local/lib/org-x/org-x.el index 1d09d37..b4e49c2 100644 --- a/local/lib/org-x/org-x.el +++ b/local/lib/org-x/org-x.el @@ -1763,11 +1763,14 @@ timestamp in the contents of the headline will be shifted." subtree) (t (org-ml-headline-map-planning* - (-some->> it - (org-ml-map-property* :scheduled - (when it (org-ml-timestamp-shift offset unit it))) - (org-ml-map-property* :deadline - (when it (org-ml-timestamp-shift offset unit it)))) + (-let (((&plist :scheduled s :deadline d) it)) + (when s + (->> (org-ml-timelist-shift offset unit s) + (plist-put it :scheduled))) + (when d + (->> (org-ml-timelist-shift offset unit d) + (plist-put it :deadline))) + it) subtree))))) (shift (offset unit subtree)