diff --git a/doc/configuration.md b/doc/configuration.md index c205155..7849294 100644 --- a/doc/configuration.md +++ b/doc/configuration.md @@ -98,14 +98,14 @@ Org-roam tries its best to locate the Graphviz executable from your `PATH`, but if it fails to do so, you may set it manually: ``` -(setq org-roam-graphviz-executable "/path/to/dot") +(setq org-roam-graph-executable "/path/to/dot") ``` You may also choose to use `neato` in place of `dot`, which generates a more compact graph layout. ``` -(setq org-roam-graphviz-executable "/path/to/neato") -(setq org-roam-graphviz-extra-options '(("overlap" . "false"))) +(setq org-roam-graph-executable "/path/to/neato") +(setq org-roam-graph-extra-config '(("overlap" . "false"))) ``` Org-roam also attempts to use Firefox (located on `PATH`) to view the diff --git a/org-roam-graph.el b/org-roam-graph.el index 4c47de0..883430f 100644 --- a/org-roam-graph.el +++ b/org-roam-graph.el @@ -47,12 +47,16 @@ :group 'org-roam) (defcustom org-roam-graph-executable (executable-find "dot") - "Path to grapher executable." + "Path to graphing executable." :type 'string :group 'org-roam) -(defcustom org-roam-grapher-extra-options nil - "Extra options when constructing the grapher graph. +(defvaralias 'org-roam-graphviz-extra-options 'org-roam-graph-extra-config) +(defvaralias 'org-roam-grapher-extra-options 'org-roam-graph-extra-config) +(make-obsolete-variable 'org-roam-graphviz-extra-options 'org-roam-graph-extra-config "2020/03/31") +(make-obsolete-variable 'org-roam-grapher-extra-options 'org-roam-graph-extra-config "2020/03/31") +(defcustom org-roam-graph-extra-config nil + "Extra options passed to the graphing executable. Example: '((\"rankdir\" . \"LR\"))" :type '(alist) @@ -111,7 +115,7 @@ set WHERE to true if WHERE query already exists." (nreverse res))) (defun org-roam-graph--build () - "Build the grapher string. + "Build the graph output string. The Org-roam database titles table is read, to obtain the list of titles. The file-links table is then read to obtain all directed links, and formatted into a digraph." @@ -127,7 +131,7 @@ into a digraph." ,@(org-roam-graph--expand-matcher 'file-from t t)]) (edges (org-roam-db-query edges-query))) (insert "digraph \"org-roam\" {\n") - (dolist (option org-roam-grapher-extra-options) + (dolist (option org-roam-graph-extra-config) (insert (concat (car option) "=" (cdr option)