ENH don't allow survival goals to be linked to endpoint
This commit is contained in:
parent
adbaf9958c
commit
59ae74ef5a
|
@ -2159,13 +2159,15 @@ FUTURE-LIMIT in a list."
|
||||||
(--map (format-key it-category it)))
|
(--map (format-key it-category it)))
|
||||||
(list (format-key it-category it)))))))
|
(list (format-key it-category it)))))))
|
||||||
|
|
||||||
(defun org-x-dag--classify-goal-link (which id)
|
(defun org-x-dag--classify-goal-link (which which-goal id)
|
||||||
(let ((f (org-x-dag-id->file id)))
|
(let ((f (org-x-dag-id->file id)))
|
||||||
(cond
|
(cond
|
||||||
((member f (org-x-dag->action-files))
|
((member f (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)
|
||||||
|
((and which-child (equal f (org-x-dag->goal-file which-child)))
|
||||||
|
:child-goal)
|
||||||
((equal f (org-x-dag->planning-file :quarterly))
|
((equal f (org-x-dag->planning-file :quarterly))
|
||||||
:plan)
|
:plan)
|
||||||
(t
|
(t
|
||||||
|
@ -2182,18 +2184,20 @@ FUTURE-LIMIT in a list."
|
||||||
:goal-parents goal-parents
|
:goal-parents goal-parents
|
||||||
:invalid-parents invalid-parents)))
|
:invalid-parents invalid-parents)))
|
||||||
|
|
||||||
(defun org-x-dag-scan-toplevel-goals (which)
|
(defun org-x-dag-scan-toplevel-goals (which which-goal)
|
||||||
(cl-flet
|
(cl-flet
|
||||||
((format-id
|
((format-id
|
||||||
(category id)
|
(category id)
|
||||||
(-let* (((buffer linked) (org-x-dag-id->split-children id))
|
(-let* (((buffer linked) (org-x-dag-id->split-children id))
|
||||||
((&alist :action :local :plan :other)
|
((&alist :action :local :child-goal :plan :other)
|
||||||
(--group-by (org-x-dag--classify-goal-link which it) linked))
|
(--group-by
|
||||||
|
(org-x-dag--classify-goal-link which which-child it)
|
||||||
|
linked))
|
||||||
(tags (org-x-dag-id->tags nil id)))
|
(tags (org-x-dag-id->tags nil id)))
|
||||||
(-> (org-x-dag-format-tag-node category tags id)
|
(-> (org-x-dag-format-tag-node category tags id)
|
||||||
(org-x-dag--add-goal-status which
|
(org-x-dag--add-goal-status which
|
||||||
(append buffer local)
|
(append buffer local)
|
||||||
action
|
(append action child-goal)
|
||||||
other)))))
|
other)))))
|
||||||
(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
|
||||||
|
@ -2201,8 +2205,7 @@ FUTURE-LIMIT in a list."
|
||||||
(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))))
|
||||||
,(org-x-dag->goal-file :survival))))
|
|
||||||
(cl-flet
|
(cl-flet
|
||||||
((format-id
|
((format-id
|
||||||
(category id)
|
(category id)
|
||||||
|
@ -2228,8 +2231,8 @@ FUTURE-LIMIT in a list."
|
||||||
(list (format-id it-category it)))))))
|
(list (format-id it-category it)))))))
|
||||||
|
|
||||||
(defun org-x-dag-scan-goals ()
|
(defun org-x-dag-scan-goals ()
|
||||||
(append (org-x-dag-scan-toplevel-goals :lifetime)
|
(append (org-x-dag-scan-toplevel-goals :lifetime :endpoint)
|
||||||
(org-x-dag-scan-toplevel-goals :survival)
|
(org-x-dag-scan-toplevel-goals :survival nil)
|
||||||
(org-x-dag-scan-epgs)))
|
(org-x-dag-scan-epgs)))
|
||||||
|
|
||||||
(defun org-x-dag-scan-errors ()
|
(defun org-x-dag-scan-errors ()
|
||||||
|
|
Loading…
Reference in New Issue