From ed1fde1e5536df82214a6f5c842be426de0e6a8a Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Tue, 22 Feb 2022 18:36:12 -0500 Subject: [PATCH] ENH put quarterly plan in terms of life buckets --- local/lib/org-x/org-x-dag.el | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/local/lib/org-x/org-x-dag.el b/local/lib/org-x/org-x-dag.el index 857b67d..35d3b42 100644 --- a/local/lib/org-x/org-x-dag.el +++ b/local/lib/org-x/org-x-dag.el @@ -666,17 +666,28 @@ A date like (YEAR MONTH DAY).") :paragraph (symbol-name it))) (apply #'org-ml-build-plain-list) (org-ml-build-drawer org-x-drwr-categories) - (org-ml-build-section)))) - (if sec (cons sec goals) goals))) + (org-ml-build-section))) + (subtrees (--map (apply #'org-ml-build-headline! + :level 3 + :title-text (plist-get (cdr it) :desc) + :tags `(,(plist-get (cdr it) :tag)) + (alist-get (car it) goals)) + org-x-life-categories))) + (if sec (cons sec goals) subtrees))) (defun org-x-dag-qtp-from-children (children) ;; ignore properties, planning, etc - (-let* (((sec goals) (if (org-ml-is-type 'section (car children)) - `(,(car children) ,(cdr children)) - `(nil ,children))) + (-let* (((sec subtrees) (if (org-ml-is-type 'section (car children)) + `(,(car children) ,(cdr children)) + `(nil ,children))) (cats (-some->> sec (--find (org-x--is-drawer-with-name org-x-drwr-categories it)) - (org-x-qtp-drawer-to-categories)))) + (org-x-qtp-drawer-to-categories))) + (goals (--map (let* ((tag (car (org-ml-get-property :tags it))) + (key (car (--find (equal tag (plist-get (cdr it) :tag)) + org-x-life-categories)))) + (cons key (org-ml-headline-get-subheadlines it))) + subtrees))) (list :categories cats :goals goals))) (defun org-x-dag-qtp-get (quarter)