From 977afd597a242783ebfb0b5d8b3bced661083705 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Tue, 19 Oct 2021 23:36:26 -0400 Subject: [PATCH] ENH remove agenda/action items when resetting headlines --- local/lib/org-x/org-x.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/local/lib/org-x/org-x.el b/local/lib/org-x/org-x.el index 97b32b0..8b2c11b 100644 --- a/local/lib/org-x/org-x.el +++ b/local/lib/org-x/org-x.el @@ -1380,6 +1380,11 @@ This includes unchecking all checkboxes, marking keywords as (org-ml-headline-map-supercontents* config (-some->> it (org-ml-supercontents-set-logbook nil))) (org-ml-headline-set-node-property org-x-prop-created created-ts) + ;; remove agenda/action items (don't bother checking if a meeting) + (org-ml-headline-map-contents* (org-x-logbook-config) + (-some->> it + (--remove (org-x--is-drawer-with-name org-x-drwr-action it)) + (--remove (org-x--is-drawer-with-name org-x-drwr-agenda it)))) ;; remove CLOSED planning entry (org-ml-headline-map-planning* (-some->> it (org-ml-planning-set-timestamp! :closed nil)))