(chore): update org-roam-graph variable names (#383)

See: https://github.com/jethrokuan/org-roam/issues/382
This commit is contained in:
N V 2020-03-31 04:56:15 -04:00 committed by GitHub
parent 04acbda916
commit b06e296e88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 8 deletions

View file

@ -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

View file

@ -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)