From 7891e87cd9b166010a58920c8f2084a6032523b5 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Sat, 19 Feb 2022 12:46:17 -0500 Subject: [PATCH] ADD qtp goal linking function --- local/lib/org-x/org-x-dag.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/local/lib/org-x/org-x-dag.el b/local/lib/org-x/org-x-dag.el index fd497ba..4c03427 100644 --- a/local/lib/org-x/org-x-dag.el +++ b/local/lib/org-x/org-x-dag.el @@ -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)