From 35a29ad1b4e77feaccb5391278044cf6bac3f704 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Fri, 25 Mar 2022 23:33:55 -0400 Subject: [PATCH] REF make name less confusing --- local/lib/dag/dag.el | 11 +++++------ local/lib/org-x/org-x-dag.el | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/local/lib/dag/dag.el b/local/lib/dag/dag.el index 144d5a8..c903a0c 100644 --- a/local/lib/dag/dag.el +++ b/local/lib/dag/dag.el @@ -379,14 +379,13 @@ ZS." (!cdr to-insert*)) (list adjlist (dag--prune-broken-edges broken-ht)))) -(defun dag-alist-to-dag (parent-adjlist) +(defun dag-plist-to-dag (parent-adjlist) "Convert PARENT-ADJLIST to a DAG. -PARENT-ADJLIST is an alist where each member represents a -node in which the car is a identifying the node and the cdr is a -list of other keys representing edges to the parents of the car. -The set of all car keys must be equivalent to the set of all cdr -keys. +PARENT-ADJLIST is a list of plists where each member represents a +node in which the :id is the node ID, :parents are the ID's of +the parents of the ID in :id, and :node-meta is arbitrary +metadata associated with the node. Return a DAG object." (-let (((a b) (dag--alist-to-ht parent-adjlist))) diff --git a/local/lib/org-x/org-x-dag.el b/local/lib/org-x/org-x-dag.el index 819e6f2..fe30515 100644 --- a/local/lib/org-x/org-x-dag.el +++ b/local/lib/org-x/org-x-dag.el @@ -2060,7 +2060,7 @@ removed from, added to, or edited within the DAG respectively." (defun org-x-dag-update-dag (to-insert to-remove) (let* ((dag (org-x-dag->dag)) - (dag* (if (dag-is-empty-p dag) (dag-alist-to-dag to-insert) + (dag* (if (dag-is-empty-p dag) (dag-plist-to-dag to-insert) (dag-edit-nodes to-remove to-insert dag)))) (plist-put org-x-dag :dag dag*)))