ADD qtp goal linking function

This commit is contained in:
Nathan Dwarshuis 2022-02-19 12:46:17 -05:00
parent 5ed8dccc67
commit 7891e87cd9
1 changed files with 13 additions and 0 deletions

View File

@ -2157,6 +2157,7 @@ FUTURE-LIMIT in a list."
(alist-get (completing-read "Node: " mapper) mapper nil nil #'equal))))
(defun org-x-dag-link-ltg-to-epg ()
(interactive)
(if (not (equal (buffer-file-name) (org-x-get-endpoint-goal-file)))
(message "Not in endpoint goal file")
(org-ml-update-this-headline*
@ -2166,6 +2167,18 @@ FUTURE-LIMIT in a list."
(if p (org-x-dag-headline-remove-parent-link i it)
(org-x-dag-headline-add-parent-link i it))))))
(defun org-x-dag-link-goal-to-qtp ()
(interactive)
(if (not (equal (buffer-file-name) (org-x-qtp-get-file)))
(message "Not in quarterly plan file")
(org-ml-update-this-headline*
(-let* ((goal-ids (append (org-x-dag->ltg-ids)
(org-x-dag->epg-ids)))
(cur-ids (org-x-dag-headline-get-parent-links it))
((&plist :id i :presentp p) (org-x-dag-read-id goal-ids cur-ids)))
(if p (org-x-dag-headline-remove-parent-link i it)
(org-x-dag-headline-add-parent-link i it))))))
;;; AGENDA VIEWS
(defun org-x-dag-agenda-run-series (name files cmds)