changelog shortlog graph tags branches files raw help

Mercurial > core / changeset: more graph updates

changeset 665: c60decbaae3d
parent 664: 4d8451fe5423
child 666: f15e0f021a64
author: Richard Westhaver <ellis@rwest.io>
date: Sun, 22 Sep 2024 21:29:15 -0400
files: emacs/default.el emacs/lib/graph.el emacs/lib/publish.el
description: more graph updates
     1.1--- a/emacs/default.el	Sun Sep 22 01:02:49 2024 -0400
     1.2+++ b/emacs/default.el	Sun Sep 22 21:29:15 2024 -0400
     1.3@@ -33,6 +33,7 @@
     1.4  shr-image-animate nil
     1.5  shr-discard-aria-hidden t
     1.6  bookmark-default-file (expand-file-name "bookmarks" user-emacs-directory)
     1.7+ set-mark-command-repeat-pop t
     1.8  tempo-interactive t
     1.9  emms-directory (expand-file-name "emms" user-emacs-directory)
    1.10  gnus-cache-directory (expand-file-name "gnus" user-emacs-directory)
     2.1--- a/emacs/lib/graph.el	Sun Sep 22 01:02:49 2024 -0400
     2.2+++ b/emacs/lib/graph.el	Sun Sep 22 21:29:15 2024 -0400
     2.3@@ -36,7 +36,7 @@
     2.4   :type 'directory
     2.5   :group 'graph)
     2.6 
     2.7-(defcustom org-graph-locations (list (join-paths company-org-directory "notes"))
     2.8+(defcustom org-graph-locations (list (join-paths company-org-directory "notes/"))
     2.9   "List of directories to check for nodes."
    2.10   :type '(list directory)
    2.11   :group 'graph)
    2.12@@ -85,19 +85,30 @@
    2.13   :type 'org-graph-db-handle
    2.14   :group 'graph)
    2.15 
    2.16-(defun org-graph-from-id-locations ()
    2.17+(defun org-graph-from-id-locations (&optional edges local)
    2.18   "Populate the `org-graph' from `org-id-locations', filtering out any
    2.19-entries not under a member of `org-graph-locations'."
    2.20+entries not under a member of `org-graph-locations'. When EDGES is
    2.21+non-nil visit each node and collect all edges found."
    2.22   (interactive)
    2.23-  (setq-local org-graph (copy-hash-table (org-id-locations-load)))
    2.24-  (maphash
    2.25-   (lambda (k v)
    2.26-     (mapc
    2.27-      (lambda (x)
    2.28-        (unless (string-prefix-p x (file-truename v))
    2.29-          (remhash k org-graph)))
    2.30-      org-graph-locations))
    2.31-   org-graph))
    2.32+  (save-excursion
    2.33+    (let* ((node-ids (org-id-locations-load))
    2.34+           (graph (make-org-graph :nodes node-ids)))
    2.35+      (maphash
    2.36+       (lambda (k v)
    2.37+         (if-let ((ok (cl-loop for l in org-graph-locations
    2.38+                               when (string-prefix-p l (file-truename v))
    2.39+                               return t)))
    2.40+             (let ((pos (cdr (org-id-find-id-in-file k v))))
    2.41+               (message "%s %s" k v)
    2.42+               (org-with-file-buffer v
    2.43+                 (goto-char pos)
    2.44+                 (org-graph-node-at-point graph)
    2.45+                 (when edges (org-graph-edges-at-point graph))))
    2.46+           (remhash k (org-graph-nodes graph))))
    2.47+       (org-graph-nodes graph))
    2.48+      (if local
    2.49+          (setq-local org-graph graph)
    2.50+        (setq org-graph graph)))))
    2.51 
    2.52 (defun org-graph-files ()
    2.53   (org-list-files org-graph-locations org-agenda-extensions))
    2.54@@ -122,7 +133,8 @@
    2.55 
    2.56 (defun org-graph-node-at-point (&optional update)
    2.57   "Return the `org-graph-node' at point. When UPDATE is non-nil insert or
    2.58-update the node into the currently active org-graph."
    2.59+update the node into the org-graph object specified or when 't' use the
    2.60+currently active org-graph."
    2.61   (let* ((file (buffer-file-name))
    2.62          (node (make-org-graph-node :point (point) :file file)))
    2.63     (if (derived-mode-p 'org-mode)
    2.64@@ -132,38 +144,68 @@
    2.65                     ;; use the filename, create a hash as id
    2.66                     (org-graph-node-id node) (org-graph--file-hash file))
    2.67             (setf (org-graph-node-id node) (org-id-get)
    2.68-                  (org-graph-node-name node) (cadddr (org-heading-components)))))
    2.69-          (setf (org-graph-node-id node) (org-graph--file-hash file)
    2.70-                (org-graph-node-name node) (file-name-nondirectory file)))
    2.71+                  (org-graph-node-name node) (elt (org-heading-components) 4))))
    2.72+      (setf (org-graph-node-id node) (org-graph--file-hash file)
    2.73+            (org-graph-node-name node) (file-name-nondirectory file)))
    2.74     (when update
    2.75-      (puthash (org-graph-node-id node) node (org-graph-nodes org-graph)))
    2.76-    (message "%s" node)))
    2.77+      (puthash (org-graph-node-id node) node (org-graph-nodes (if (eql t update) org-graph update))))
    2.78+    node))
    2.79+
    2.80+(defun org-graph-collect-edge ()
    2.81+  "Collect the edge at point which should be a line created with `org-graph-edge--insert'."
    2.82+  (org-with-point-at (beginning-of-line)
    2.83+    (when (org-at-timestamp-p 'lax)
    2.84+      (let ((ts (match-string-no-properties 0))
    2.85+            (end (match-end 0)))
    2.86+        (goto-char (1+ end))
    2.87+        ;; next 2 chars are the arrow
    2.88+        (let ((arrow (org-graph-edge-arrow* (buffer-substring-no-properties (point) (1+ (point))))))
    2.89+          (goto-char (+ (point) 4))
    2.90+          (make-org-graph-edge :in (org-id-get)
    2.91+                               :type arrow
    2.92+                               :timestamp (org-parse-time-string ts t) 
    2.93+                               :out (string-trim (org--link-at-point) "id:")))))))
    2.94 
    2.95-;; TODO 2024-09-17: 
    2.96+(defun org-graph-collect-edges-at-point (&optional update)
    2.97+  "Collect the contents of the EDGES drawer from node at point. When UPDATE
    2.98+is non-nil insert or update the node into the org-graph object specified
    2.99+or when 't' use the currently active org-graph."
   2.100+  (with-org-graph-edge-drawer (end)
   2.101+    (re-search-backward (rx bol ?: (literal (org-graph-edge-drawer)) ?: eol) nil t)
   2.102+    (goto-char (1+ (match-end 0)))
   2.103+    (let ((edges
   2.104+           (cl-loop while (> (point-max) end (point))
   2.105+                    collect (org-graph-collect-edge)
   2.106+                    do (next-line))))
   2.107+      (when update
   2.108+        (mapc (lambda (e)
   2.109+                (puthash 
   2.110+                 (org-graph-edge-in e) 
   2.111+                 e 
   2.112+                 (org-graph-edges (if (eql t update) org-graph update))))
   2.113+              edges))
   2.114+      edges)))
   2.115+
   2.116 (defun org-graph-edges-at-point (&optional update)
   2.117   "Return a list of `org-graph-edge' instances associated with the node at
   2.118 point. When UPDATE is non-nil insert or update the edges into the
   2.119 currently active org-graph."
   2.120   (interactive)
   2.121-  (let ((edges))
   2.122-    (if (derived-mode-p 'org-mode))
   2.123-    (when update
   2.124-      (dolist (edge edges)
   2.125-        (puthash (org-graph-edge-in edge) edge (org-graph-edges org-graph))))
   2.126-    (message "%s" edge)))
   2.127+    (when (derived-mode-p 'org-mode)
   2.128+      (org-graph-collect-edges-at-point update)))
   2.129 
   2.130 (defun org-graph-buffer-update (&optional buffer)
   2.131   "Map over an org buffer adding all nodes to the active org-graph."
   2.132   (interactive)
   2.133-    (save-excursion
   2.134-      (with-current-buffer (or buffer (current-buffer))
   2.135-        ;; capture file node
   2.136-        (goto-char (point-min))
   2.137-        (org-graph-node-at-point t)
   2.138-        (when (derived-mode-p 'org-mode)
   2.139-          (org-map-entries (lambda () (org-graph-node-at-point t)))))))
   2.140-  
   2.141-;;; Links
   2.142+  (save-excursion
   2.143+    (with-current-buffer (or buffer (current-buffer))
   2.144+      ;; capture file node
   2.145+      (goto-char (point-min))
   2.146+      (org-graph-node-at-point t)
   2.147+      (when (derived-mode-p 'org-mode)
   2.148+        (org-map-entries (lambda () (org-graph-node-at-point t)))))))
   2.149+
   2.150+;;; Edges
   2.151 ;; See https://github.com/toshism/org-super-links/blob/develop/org-super-links.el
   2.152 (declare-function org-make-link-description-function "ext:org-mode")
   2.153 
   2.154@@ -179,7 +221,7 @@
   2.155 
   2.156 Default is the function `org-graph-edge-prefix-timestamp'
   2.157 which returns an inactive timestamp formatted according to the variable
   2.158-`org-time-stamp-formats' and a separator ' <- '.")
   2.159+`org-time-stamp-formats'.")
   2.160 
   2.161 ;;  TODO 2024-09-16: do we need this? what sort of information for a
   2.162 ;;  given edge would go in the postfix? this may be better suited as a
   2.163@@ -189,18 +231,6 @@
   2.164 This can be a string, nil, or a function that takes no arguments and
   2.165 returns a string")
   2.166 
   2.167-(defvar org-graph-edge-related-into-drawer t
   2.168-    "Controls how/where to insert links.
   2.169-If non-nil a drawer will be created and links inserted there.  The
   2.170-default is `org-graph-edge-related-drawer-default-name'.  If this is set to a
   2.171-string a drawer will be created using that string.  For example LINKS.
   2.172-If nil links will just be inserted at point.")
   2.173-
   2.174-(defvar org-graph-edge-related-drawer-default-name "EDGES"
   2.175-  "Default name to use for link drawer.
   2.176-If variable `org-graph-edge-related-into-drawer' is 't' use this
   2.177-name for the drawer.  See variable `org-graph-edge-related-into-drawer' for more info.")
   2.178-
   2.179 (defvar org-graph-edge-link-prefix nil
   2.180   "Prefix to insert before the link.
   2.181 This can be a string, nil, or a function that takes no arguments and
   2.182@@ -242,18 +272,37 @@
   2.183 (defvar org-graph-edge-indicator-alist
   2.184   '((link . "->")
   2.185     (backlink . "<-")
   2.186-    (sibling . "--")
   2.187+    (relation . "--")
   2.188     (parent . ">>")
   2.189     (child . "<<"))
   2.190   "An alist of (EDGE-TYPE . INDICATOR) pairs. Each INDICATOR is a string
   2.191 which will be printed between the properties and backlink of the
   2.192 associated EDGE-TYPE.")
   2.193 
   2.194+(defun org-graph-edge-arrow (sym)
   2.195+  (cdr (assoc sym org-graph-edge-indicator-alist)))
   2.196+
   2.197+(defun org-graph-edge-arrow* (str)
   2.198+  "Reverse lookup of edge arrow symbol."
   2.199+  (car (rassoc str org-graph-edge-indicator-alist)))
   2.200+
   2.201 (defun org-graph-edge-get-location ()
   2.202   "Default for function `org-graph-edge-search-function' that reuses the `org-refile' machinery."
   2.203   (let ((target (org-refile-get-location "Node")))
   2.204     (org-graph-edge--insert-link (set-marker (make-marker) (car (cdddr target))
   2.205-                                 (get-file-buffer (car (cdr target)))))))
   2.206+                                             (get-file-buffer (car (cdr target)))))))
   2.207+
   2.208+(cl-defmacro with-org-graph-edge-drawer ((start &optional create) &rest body)
   2.209+  "START is a symbol which is bound to the start of the edge drawer."
   2.210+  (declare (indent 1))
   2.211+  `(save-excursion
   2.212+     (org-with-wide-buffer
   2.213+      (let ((org-log-into-drawer (org-graph-edge-drawer)))
   2.214+        (org-graph-edge--org-narrow-to-here)
   2.215+        (let ((,start (org-log-beginning ,create)))
   2.216+          (when (re-search-forward (rx bol ?: "END" ?: eol) nil t)
   2.217+            (goto-char ,start)
   2.218+            ,@body))))))
   2.219 
   2.220 (defun org-graph-edge-search-function ()
   2.221   "Call the search interface specified in variable `org-graph-edge-search-function'."
   2.222@@ -286,10 +335,8 @@
   2.223 ;; TODO 2024-09-16: edge-properties
   2.224 (defun org-graph-edge-prefix-timestamp ()
   2.225   "Return the default prefix string for an edge.
   2.226-Inactive timestamp formatted according to `org-time-stamp-formats' and
   2.227-a separator ' <- '."
   2.228-  (concat (format-time-string (org-time-stamp-format t t) (current-time))
   2.229-        " <- "))
   2.230+Inactive timestamp formatted according to `org-time-stamp-formats'."
   2.231+  (format-time-string (org-time-stamp-format t t) (current-time)))
   2.232 
   2.233 (defun org-graph-edge-default-description-formatter (link desc)
   2.234   "Return a string to use as the link desciption.
   2.235@@ -311,21 +358,6 @@
   2.236           ((stringp p) p)
   2.237           (t org-graph-edge-drawer))))
   2.238 
   2.239-;; delete related functions
   2.240-(defun org-graph-edge--find-link (id)
   2.241-  "Return link element for ID."
   2.242-  (save-restriction
   2.243-    (org-graph-edge--org-narrow-to-here)
   2.244-    (let ((link
   2.245-           (org-element-map (org-element-parse-buffer) 'link
   2.246-             (lambda (link)
   2.247-               (when (string= (org-element-property :path link) id)
   2.248-                 link)))))
   2.249-      (widen)
   2.250-      (if (> (length link) 1)
   2.251-          (error "Multiple links found.  Canceling delete")
   2.252-        (car link)))))
   2.253-
   2.254 (defun org-graph-edge--org-narrow-to-here ()
   2.255   "Narrow to current heading, excluding subheadings."
   2.256   (org-narrow-to-subtree)
   2.257@@ -333,10 +365,20 @@
   2.258     (org-next-visible-heading 1)
   2.259     (narrow-to-region (point-min) (point))))
   2.260 
   2.261+;; delete related functions
   2.262+(defun org-graph-find-edges (id)
   2.263+  "Return link elements for ID."
   2.264+    (org-graph-edge--org-narrow-to-here)
   2.265+    (let ((links
   2.266+           (org-element-map (org-element-parse-buffer) 'link
   2.267+             (lambda (link)
   2.268+               (when (string= (org-element-property :path link) id)
   2.269+                 link)))))
   2.270+      (widen)
   2.271+      links))
   2.272 
   2.273-(defun org-graph-edge--in-drawer ()
   2.274-  "Return nil if point is not in a drawer.
   2.275-Return element at point is in a drawer."
   2.276+(defun org-graph-edge--in-drawer-p ()
   2.277+  "Return non-nil if point is in drawer. Value is element at point."
   2.278   (let ((element (org-element-at-point)))
   2.279     (while (and element
   2.280                 (not (memq (org-element-type element) '(drawer property-drawer))))
   2.281@@ -344,8 +386,7 @@
   2.282     element))
   2.283 
   2.284 (defun org-graph-edge--delete-link (link)
   2.285-  "Delete the LINK.
   2.286-If point is in drawer, delete the entire line."
   2.287+  "Delete the LINK. If point is in edges drawer, delete the entire line."
   2.288   (save-excursion
   2.289     (goto-char (org-element-property :begin link))
   2.290     (if (org-graph-edge--in-drawer)
   2.291@@ -354,71 +395,34 @@
   2.292           (org-remove-empty-drawer-at (point)))
   2.293       (delete-region (org-element-property :begin link) (org-element-property :end link)))))
   2.294 
   2.295-;;; EXPERIMENTAL 'related into drawer'
   2.296-(defun org-graph-edge-related-into-drawer ()
   2.297-  "Name of the related drawer, as a string, or nil.
   2.298-This is the value of variable
   2.299-`org-graph-edge-related-into-drawer'.  However, if the current
   2.300-entry has or inherits a RELATED_INTO_DRAWER property, it will be
   2.301-used instead of the default value."
   2.302-  (let ((p (org-entry-get nil "RELATED_INTO_DRAWER" 'inherit t)))
   2.303-    (cond ((equal p "nil") nil)
   2.304-          ((equal p "t") org-graph-edge-related-drawer-default-name)
   2.305-          ((stringp p) p)
   2.306-          (p org-graph-edge-related-drawer-default-name)
   2.307-          ((stringp org-graph-edge-related-into-drawer) org-graph-edge-related-into-drawer)
   2.308-          (org-graph-edge-related-into-drawer org-graph-edge-related-drawer-default-name))))
   2.309-
   2.310-(defun org-graph-edge-link-prefix-timestamp ()
   2.311-  "Return the default prefix string for an edge.
   2.312-Inactive timestamp formatted according to `org-time-stamp-formats' and
   2.313-a separator ' -> '."
   2.314-  (concat (format-time-string (org-time-stamp-format t t) (current-time))
   2.315-          (format " %s " (cdr (assoc 'link org-graph-edge-indicator-alist)))))
   2.316+(defun org-graph-edge--insert (link desc arrow &rest props)
   2.317+  "Insert an edge at point. ARROW is a symbol representing the type of
   2.318+arrow to insert. The rest of the arguments are parsed as :KEY VAL pairs
   2.319+which are inserted with the edge."
   2.320+  (insert (format "%s %s " (org-graph-edge-prefix)
   2.321+                  (org-graph-edge-arrow arrow)))
   2.322+  (org-insert-link nil link desc)
   2.323+  (insert (org-graph-edge-link-postfix)) 
   2.324+  (newline))
   2.325 
   2.326-(defun org-graph-edge-insert-related-link (link desc)
   2.327-  "LINK DESC related experiment."
   2.328-  (if (org-graph-edge-related-into-drawer)
   2.329-      (let* ((org-log-into-drawer (org-graph-edge-related-into-drawer))
   2.330-             (beg (org-log-beginning t)))
   2.331-        (goto-char beg)
   2.332-        (insert (org-graph-edge-link-prefix))
   2.333-        (insert (org-graph-edge-link-prefix-timestamp))
   2.334-        (org-insert-link nil link desc)
   2.335-        (insert (org-graph-edge-link-postfix) "\n")
   2.336-        (org-indent-region beg (point)))
   2.337-    (insert (org-graph-edge-link-prefix))
   2.338-    (org-insert-link nil link desc)
   2.339-    (insert (org-graph-edge-link-postfix))))
   2.340+(defun org-graph-edge-insert-related (link desc)
   2.341+  "Insert a relation edge."
   2.342+  (with-org-graph-edge-drawer (beg t)
   2.343+    (org-graph-edge--insert link desc 'relation)                              
   2.344+    (org-indent-region beg (point))))
   2.345 
   2.346-(defun org-graph-edge-quick-insert-drawer-link ()
   2.347-  "Insert link into drawer regardless of variable `org-graph-edge-related-into-drawer' value."
   2.348-  (interactive)
   2.349-  ;; how to handle prefix here?
   2.350-  (let ((org-graph-edge-related-into-drawer (or org-graph-edge-related-into-drawer t))
   2.351-        (org-graph-edge-link-prefix 'org-graph-edge-link-prefix-timestamp))
   2.352-    (org-graph-edge-link)))
   2.353-
   2.354-(defun org-graph-edge-quick-insert-inline-link ()
   2.355-  "Insert inline link regardless of variable `org-graph-edge-related-into-drawer' value."
   2.356-  (interactive)
   2.357-  ;; how to handle prefix here?
   2.358-  (let ((org-graph-edge-related-into-drawer nil)
   2.359-        (org-graph-edge-link-prefix nil))
   2.360-    (org-graph-edge-link)))
   2.361-
   2.362-;; end
   2.363-
   2.364-(defun org-graph-edge-insert (link desc)
   2.365+(defun org-graph-edge-insert-backlink (link desc)
   2.366   "Insert edge to LINK with DESC.
   2.367 Where the edge is placed is determined by the variable `org-graph-edge-drawer'."
   2.368-  (let* ((org-log-into-drawer (org-graph-edge-drawer))
   2.369-         (description (org-graph-edge-default-description-formatter link desc))
   2.370-         (beg (org-log-beginning t)))
   2.371-    (goto-char beg)
   2.372-    (insert (org-graph-edge-prefix))
   2.373-    (insert (org-link-make-string link description))
   2.374-    (insert (org-graph-edge-postfix))
   2.375+  (with-org-graph-edge-drawer (beg t)
   2.376+    (let ((description (org-graph-edge-default-description-formatter link desc)))
   2.377+      (org-graph-edge--insert link description 'backlink)
   2.378+      (org-indent-region beg (point)))))
   2.379+
   2.380+(defun org-graph-edge-insert-link (link desc)
   2.381+  "insert a forward link edge."
   2.382+  (with-org-graph-edge-drawer (beg t)
   2.383+    (org-graph-edge--insert link desc 'link)                                  
   2.384     (org-indent-region beg (point))))
   2.385 
   2.386 (defun org-graph-edge-links-action (marker hooks)
   2.387@@ -440,7 +444,7 @@
   2.388     (cons link-ref description)))
   2.389 
   2.390 (defun org-graph-edge--insert-link (target &optional no-forward)
   2.391-  "Insert link to marker TARGET at current `point`, and create edge to here.
   2.392+  "Insert link to marker TARGET and create an edge.
   2.393 Only create edges in files in `org-mode' or a derived mode, otherwise just
   2.394 act like a normal link.
   2.395 
   2.396@@ -457,22 +461,17 @@
   2.397           (widen) ;; buffer could be narrowed
   2.398           (goto-char (marker-position target))
   2.399           (when (derived-mode-p 'org-mode)
   2.400-            (org-graph-edge-insert (car source-formatted-link) (cdr source-formatted-link))))))
   2.401+            (org-graph-edge-insert-backlink (car source-formatted-link) (cdr source-formatted-link))))))
   2.402     (unless no-forward
   2.403       (with-current-buffer (marker-buffer source)
   2.404         (save-excursion
   2.405           (goto-char (marker-position source))
   2.406-          (org-graph-edge-insert-related-link (car target-formatted-link) (cdr target-formatted-link)))))))
   2.407+          (org-graph-edge-insert-link (car target-formatted-link) (cdr target-formatted-link)))))))
   2.408 
   2.409 ;;;###autoload
   2.410 (defun org-graph-edge-convert-link (arg)
   2.411   "Convert a normal `org-mode' link at `point' to a graph link, ARG prefix.
   2.412-If variable `org-graph-edge-related-into-drawer' is non-nil move
   2.413-the link into drawer.
   2.414-
   2.415-When called interactively with a `C-u' prefix argument ignore
   2.416-variable `org-graph-edge-related-into-drawer' configuration and
   2.417-do not modify existing link."
   2.418+When called interactively with a `C-u' prefix argument do not modify existing link."
   2.419   (interactive "P")
   2.420   (let ((from-m (point-marker))
   2.421         (target (save-window-excursion
   2.422@@ -480,10 +479,9 @@
   2.423                     (save-excursion
   2.424                       (org-open-at-point)
   2.425                       (point-marker))))))
   2.426-    (org-graph-edge--insert-link target (or arg (not org-graph-edge-related-into-drawer)))
   2.427+    (org-graph-edge--insert-link target arg)
   2.428     (goto-char (marker-position from-m)))
   2.429-
   2.430-  (when (and (not arg) (org-graph-edge-related-into-drawer))
   2.431+  (when (not arg)
   2.432     (let ((begin (org-element-property :begin (org-element-context)))
   2.433           (end (org-element-property :end (org-element-context))))
   2.434       (delete-region begin end))))
   2.435@@ -499,36 +497,22 @@
   2.436       (save-excursion
   2.437         (let ((id (org-id-get (point))))
   2.438           (org-open-at-point)
   2.439-          (let ((link-element (org-graph-edge--find-link id)))
   2.440-            (if link-element
   2.441-                (org-graph-edge--delete-link link-element)
   2.442+          (let ((link-elements (org-graph-find-edges id)))
   2.443+            (if link-elements
   2.444+                (if (> (length link-elements) 1)
   2.445+                    (error "Multiple links found.")
   2.446+                  (org-graph-edge--delete-link (car link-elements)))
   2.447               (message "No edge found. Deleting active only.")))))))
   2.448   (org-graph-edge--delete-link (org-element-context)))
   2.449 
   2.450-(defvar org-graph-stored-mark nil
   2.451-  "mark stored with `org-graph-edge-store'.")
   2.452-
   2.453-(defun org-graph-edge-store ()
   2.454-  "Store a point to register for use in function `org-graph-edge-insert-link'.
   2.455-This is primarily intended to be called before `org-capture', but
   2.456-could possibly even be used to replace `org-store-link' IF
   2.457-function `org-graph-edge-insert-link' is used to replace
   2.458-`org-insert-link'.  This has not been thoroughly tested outside
   2.459-of links to/form org files."
   2.460-  (interactive "P")
   2.461-  (let ((c1 (make-marker)))
   2.462-    (set-marker c1 (point) (current-buffer))
   2.463-    (setq org-graph-stored-mark c1)
   2.464-    (message "Mark stored.")))
   2.465-
   2.466 ;;;###autoload
   2.467-(defun org-graph-edge-insert-link ()
   2.468-  "Insert an edge from the list `org-graph-stored-marks'."
   2.469+(defun org-graph-edge-insert ()
   2.470+  "Insert an edge from `org-stored-links')"
   2.471   (interactive)
   2.472-  (if org-graph-stored-mark
   2.473-      (progn 
   2.474-        (org-graph-edge--insert-link org-graph-stored-mark)
   2.475-        (setq org-graph-stored-mark nil))
   2.476+  (if org-stored-links
   2.477+      (progn
   2.478+        (org-link-open (pop org-stored-links))
   2.479+        (org-graph-edge--insert-link (set-marker (make-marker) (point))))
   2.480     (org-graph-edge-link)))
   2.481 
   2.482 ;;;###autoload
     3.1--- a/emacs/lib/publish.el	Sun Sep 22 01:02:49 2024 -0400
     3.2+++ b/emacs/lib/publish.el	Sun Sep 22 21:29:15 2024 -0400
     3.3@@ -50,8 +50,8 @@
     3.4 
     3.5 (setq org-html-link-home url)
     3.6 
     3.7-(setq org-html-home/up-format "<div id=\"org-div-home-and-up\"><a href=\"%s\" accesskey=\"h\"><button class=home>⌂</button></a><a href=\"%s\" accesskey=\"u\"><button class=up>▲</button></a>
     3.8-<button accesskey=\"s\" class=show onclick=open_all_sections()>show</button> <button accesskey=\"x\" class=hide onclick=close_all_sections()>hide</button></div>")
     3.9+(setq org-html-home/up-format "<nav id=\"org-div-home-and-up\"><a href=\"%s\" accesskey=\"h\"><button class=home>⌂</button></a><a href=\"%s\" accesskey=\"u\"><button class=up>▲</button></a>
    3.10+<button accesskey=\"s\" class=show onclick=open_all_sections()>show</button> <button accesskey=\"x\" class=hide onclick=close_all_sections()>hide</button></nav>")
    3.11       
    3.12 (setq org-publish-project-alist
    3.13       `(("compiler.company" :components ("index" "meta" "blog" "docs" "notes" "plan"))