ENH remove done entries from link menu

This commit is contained in:
Nathan Dwarshuis 2024-02-19 18:07:49 -05:00
parent 3c1808b652
commit a6ef9a3bba
1 changed files with 23 additions and 5 deletions

View File

@ -4399,23 +4399,30 @@ FUTURE-LIMIT in a list."
(either :right it))))) (either :right it)))))
;; child id functions ;; child id functions
(remove-done
(ids)
(--remove (member (org-x-dag-id->todo it) org-done-keywords) ids))
(action-qtp-getter (action-qtp-getter
() ()
(->> (org-x-dag->action-ids) (->> (org-x-dag->action-ids)
;; TODO could also remove DONE/CANC and things ;; TODO could also remove DONE/CANC and things
;; underneath these ;; underneath these
(--remove (org-x-dag-id->ns-key :survivalp it)) (--remove (org-x-dag-id->ns-key :survivalp it))
(remove-done)
(append (org-x-dag->current-qtp-ids)))) (append (org-x-dag->current-qtp-ids))))
(svg-action-getter (svg-action-getter
() ()
(->> (org-x-dag->action-ids) (->> (org-x-dag->action-ids)
;; TODO could also remove DONE/CANC and things ;; TODO could also remove DONE/CANC and things
;; underneath these ;; underneath these
(remove-done)
(--remove (and (org-x-dag-id->ns-key :committed it) (--remove (and (org-x-dag-id->ns-key :committed it)
(not (org-x-dag-id->ns-key :survivalp it)))))) (not (org-x-dag-id->ns-key :survivalp it))))))
(epg-action-qtp-getter (epg-action-qtp-getter
() ()
`(,@(org-x-dag->epg-ids) ,@(action-qtp-getter))) (->> `(,@(org-x-dag->epg-ids) ,@(action-qtp-getter))
(remove-done)))
;; format functions ;; format functions
(dlp-formatter (dlp-formatter
@ -4553,16 +4560,27 @@ FUTURE-LIMIT in a list."
(either :right)) (either :right))
(parse-hl))) (parse-hl)))
(remove-done
(ids)
(--remove (member (org-x-dag-id->todo it) org-done-keywords) ids))
;; parent id getters ;; parent id getters
(tlg-getter (tlg-getter
() ()
(append (org-x-dag->epg-ids) (org-x-dag->ltg-ids))) (->> (append (org-x-dag->epg-ids) (org-x-dag->ltg-ids))
(remove-done)))
(goal-getter (goal-getter
() ()
(append (org-x-dag->svg-ids) (tlg-getter))) (->> (append (org-x-dag->svg-ids) (tlg-getter))
(remove-done)))
(dlp-getter (dlp-getter
() ()
(append (org-x-dag->current-wkp-ids) (org-x-dag->action-ids))) (->> (append (org-x-dag->current-wkp-ids) (org-x-dag->action-ids))
(remove-done)))
(weekly-getter
()
(->> (org-x-dag->current-qtp-ids)
(remove-done)))
;; formatters ;; formatters
(goal-formatter (goal-formatter
@ -4592,7 +4610,7 @@ FUTURE-LIMIT in a list."
((equal f (org-x-dag->planning-file :weekly)) ((equal f (org-x-dag->planning-file :weekly))
(org-x-dag--link-child-to-parent (org-x-dag--link-child-to-parent
#'parse-hl #'parse-hl
#'org-x-dag->current-qtp-ids #'weekly-getter
#'org-x-dag-id->title)) #'org-x-dag-id->title))
((equal f (org-x-dag->planning-file :daily)) ((equal f (org-x-dag->planning-file :daily))
(org-x-dag--link-child-to-parent (org-x-dag--link-child-to-parent