ENH put quarterly plan in terms of life buckets

This commit is contained in:
Nathan Dwarshuis 2022-02-22 18:36:12 -05:00
parent 021b246e4b
commit ed1fde1e55
1 changed files with 17 additions and 6 deletions

View File

@ -666,17 +666,28 @@ A date like (YEAR MONTH DAY).")
:paragraph (symbol-name it))) :paragraph (symbol-name it)))
(apply #'org-ml-build-plain-list) (apply #'org-ml-build-plain-list)
(org-ml-build-drawer org-x-drwr-categories) (org-ml-build-drawer org-x-drwr-categories)
(org-ml-build-section)))) (org-ml-build-section)))
(if sec (cons sec goals) goals))) (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) (defun org-x-dag-qtp-from-children (children)
;; ignore properties, planning, etc ;; ignore properties, planning, etc
(-let* (((sec goals) (if (org-ml-is-type 'section (car children)) (-let* (((sec subtrees) (if (org-ml-is-type 'section (car children))
`(,(car children) ,(cdr children)) `(,(car children) ,(cdr children))
`(nil ,children))) `(nil ,children)))
(cats (-some->> sec (cats (-some->> sec
(--find (org-x--is-drawer-with-name org-x-drwr-categories it)) (--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))) (list :categories cats :goals goals)))
(defun org-x-dag-qtp-get (quarter) (defun org-x-dag-qtp-get (quarter)