ENH remove incubated vs action file distinction
This commit is contained in:
parent
5e087e3fee
commit
adbaf9958c
|
@ -193,8 +193,9 @@
|
||||||
:plan-files (list :daily (org-x-get-daily-plan-file)
|
:plan-files (list :daily (org-x-get-daily-plan-file)
|
||||||
:weekly (org-x-get-weekly-plan-file)
|
:weekly (org-x-get-weekly-plan-file)
|
||||||
:quarterly (org-x-qtp-get-file))
|
:quarterly (org-x-qtp-get-file))
|
||||||
:incubator-files (org-x-get-incubator-files)
|
:action-files (append (org-x-get-action-files)
|
||||||
:action-files (org-x-get-action-files)))
|
(org-x-get-incubator-files))))
|
||||||
|
|
||||||
|
|
||||||
(defun org-x-dag-flatten-goal-file-state (state)
|
(defun org-x-dag-flatten-goal-file-state (state)
|
||||||
(-let (((&plist :lifetime l :endpoint e :survival s) state))
|
(-let (((&plist :lifetime l :endpoint e :survival s) state))
|
||||||
|
@ -205,10 +206,9 @@
|
||||||
`(,q ,w ,d)))
|
`(,q ,w ,d)))
|
||||||
|
|
||||||
(defun org-x-dag-flatten-file-state (state)
|
(defun org-x-dag-flatten-file-state (state)
|
||||||
(-let (((&plist :goal-files :plan-files :incubator-files :action-files) state))
|
(-let (((&plist :goal-files :plan-files :action-files) state))
|
||||||
(append (org-x-dag-flatten-goal-file-state goal-files)
|
(append (org-x-dag-flatten-goal-file-state goal-files)
|
||||||
(org-x-dag-flatten-planning-file-state plan-files)
|
(org-x-dag-flatten-planning-file-state plan-files)
|
||||||
incubator-files
|
|
||||||
action-files)))
|
action-files)))
|
||||||
|
|
||||||
(defun org-x-dag-empty ()
|
(defun org-x-dag-empty ()
|
||||||
|
@ -287,9 +287,6 @@ that file as it currently sits on disk.")
|
||||||
(defun org-x-dag->action-files ()
|
(defun org-x-dag->action-files ()
|
||||||
(plist-get (org-x-dag->file-state) :action-files))
|
(plist-get (org-x-dag->file-state) :action-files))
|
||||||
|
|
||||||
(defun org-x-dag->incubator-files ()
|
|
||||||
(plist-get (org-x-dag->file-state) :incubator-files))
|
|
||||||
|
|
||||||
(defun org-x-dag->files ()
|
(defun org-x-dag->files ()
|
||||||
(org-x-dag-flatten-file-state (org-x-dag->file-state)))
|
(org-x-dag-flatten-file-state (org-x-dag->file-state)))
|
||||||
|
|
||||||
|
@ -653,7 +650,7 @@ be uncommitted if it is also incubated."
|
||||||
|
|
||||||
(defun org-x-dag->dlp-action-ids (which)
|
(defun org-x-dag->dlp-action-ids (which)
|
||||||
(->> (org-x-dag->dlp-ids which)
|
(->> (org-x-dag->dlp-ids which)
|
||||||
(org-x-dag-partition-child-ids (org-x-get-action-and-incubator-files))))
|
(org-x-dag-partition-child-ids (org-x-dag->action-files))))
|
||||||
|
|
||||||
(defun org-x-dag->wkp-qtp-ids (which)
|
(defun org-x-dag->wkp-qtp-ids (which)
|
||||||
(->> (org-x-dag->wkp-ids which)
|
(->> (org-x-dag->wkp-ids which)
|
||||||
|
@ -2128,7 +2125,7 @@ FUTURE-LIMIT in a list."
|
||||||
'x-project-p is-project
|
'x-project-p is-project
|
||||||
'x-scheduled sch
|
'x-scheduled sch
|
||||||
'x-deadlined dead))))))))
|
'x-deadlined dead))))))))
|
||||||
(org-x-dag-with-files (org-x-get-action-and-incubator-files)
|
(org-x-dag-with-files (org-x-dag->action-files)
|
||||||
(and (org-x-dag-id->is-toplevel-p it)
|
(and (org-x-dag-id->is-toplevel-p it)
|
||||||
(not (org-x-dag-id->is-done-p it)))
|
(not (org-x-dag-id->is-done-p it)))
|
||||||
(list (format-key it-category it)))))
|
(list (format-key it-category it)))))
|
||||||
|
@ -2165,9 +2162,7 @@ FUTURE-LIMIT in a list."
|
||||||
(defun org-x-dag--classify-goal-link (which id)
|
(defun org-x-dag--classify-goal-link (which id)
|
||||||
(let ((f (org-x-dag-id->file id)))
|
(let ((f (org-x-dag-id->file id)))
|
||||||
(cond
|
(cond
|
||||||
;; TODO consider combining these into one lookup (the only different
|
((member f (org-x-dag->action-files))
|
||||||
;; between an incubated task and non-incubated is the present of a tag
|
|
||||||
((member f `(,@(org-x-dag->incubator-files) ,@(org-x-dag->action-files)))
|
|
||||||
:action)
|
:action)
|
||||||
((equal f (org-x-dag->goal-file which))
|
((equal f (org-x-dag->goal-file which))
|
||||||
:local)
|
:local)
|
||||||
|
@ -2188,9 +2183,6 @@ FUTURE-LIMIT in a list."
|
||||||
:invalid-parents invalid-parents)))
|
:invalid-parents invalid-parents)))
|
||||||
|
|
||||||
(defun org-x-dag-scan-toplevel-goals (which)
|
(defun org-x-dag-scan-toplevel-goals (which)
|
||||||
(let ((child-files `(,(org-x-dag->goal-file which)
|
|
||||||
,@(org-x-dag->action-files)
|
|
||||||
,@(org-x-dag->incubator-files))))
|
|
||||||
(cl-flet
|
(cl-flet
|
||||||
((format-id
|
((format-id
|
||||||
(category id)
|
(category id)
|
||||||
|
@ -2206,7 +2198,7 @@ FUTURE-LIMIT in a list."
|
||||||
(org-x-dag-with-files (list (org-x-dag->goal-file which))
|
(org-x-dag-with-files (list (org-x-dag->goal-file which))
|
||||||
nil
|
nil
|
||||||
(org-x-dag-with-id it
|
(org-x-dag-with-id it
|
||||||
(list (format-id it-category it)))))))
|
(list (format-id it-category it))))))
|
||||||
|
|
||||||
(defun org-x-dag-scan-epgs ()
|
(defun org-x-dag-scan-epgs ()
|
||||||
(let ((parent-files `(,(org-x-dag->goal-file :lifetime)
|
(let ((parent-files `(,(org-x-dag->goal-file :lifetime)
|
||||||
|
@ -2609,7 +2601,7 @@ FUTURE-LIMIT in a list."
|
||||||
(defun org-x-dag-link-action-to-goal ()
|
(defun org-x-dag-link-action-to-goal ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((ids (append (org-x-dag->ltg-ids) (org-x-dag->epg-ids)))
|
(let ((ids (append (org-x-dag->ltg-ids) (org-x-dag->epg-ids)))
|
||||||
(legal (org-x-get-action-and-incubator-files)))
|
(legal (org-x-dag->action-files)))
|
||||||
;; TODO this won't work on the toplevel section
|
;; TODO this won't work on the toplevel section
|
||||||
(org-x-dag-this-headline-choose-id t legal "an action/incubator file" ids)))
|
(org-x-dag-this-headline-choose-id t legal "an action/incubator file" ids)))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue