(chore): update org-roam-graph variable names (#383)
See: https://github.com/jethrokuan/org-roam/issues/382
This commit is contained in:
parent
04acbda916
commit
b06e296e88
2 changed files with 12 additions and 8 deletions
|
@ -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:
|
`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.
|
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-graph-executable "/path/to/neato")
|
||||||
(setq org-roam-graphviz-extra-options '(("overlap" . "false")))
|
(setq org-roam-graph-extra-config '(("overlap" . "false")))
|
||||||
```
|
```
|
||||||
|
|
||||||
Org-roam also attempts to use Firefox (located on `PATH`) to view the
|
Org-roam also attempts to use Firefox (located on `PATH`) to view the
|
||||||
|
|
|
@ -47,12 +47,16 @@
|
||||||
:group 'org-roam)
|
:group 'org-roam)
|
||||||
|
|
||||||
(defcustom org-roam-graph-executable (executable-find "dot")
|
(defcustom org-roam-graph-executable (executable-find "dot")
|
||||||
"Path to grapher executable."
|
"Path to graphing executable."
|
||||||
:type 'string
|
:type 'string
|
||||||
:group 'org-roam)
|
:group 'org-roam)
|
||||||
|
|
||||||
(defcustom org-roam-grapher-extra-options nil
|
(defvaralias 'org-roam-graphviz-extra-options 'org-roam-graph-extra-config)
|
||||||
"Extra options when constructing the grapher graph.
|
(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:
|
Example:
|
||||||
'((\"rankdir\" . \"LR\"))"
|
'((\"rankdir\" . \"LR\"))"
|
||||||
:type '(alist)
|
:type '(alist)
|
||||||
|
@ -111,7 +115,7 @@ set WHERE to true if WHERE query already exists."
|
||||||
(nreverse res)))
|
(nreverse res)))
|
||||||
|
|
||||||
(defun org-roam-graph--build ()
|
(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 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
|
The file-links table is then read to obtain all directed links, and formatted
|
||||||
into a digraph."
|
into a digraph."
|
||||||
|
@ -127,7 +131,7 @@ into a digraph."
|
||||||
,@(org-roam-graph--expand-matcher 'file-from t t)])
|
,@(org-roam-graph--expand-matcher 'file-from t t)])
|
||||||
(edges (org-roam-db-query edges-query)))
|
(edges (org-roam-db-query edges-query)))
|
||||||
(insert "digraph \"org-roam\" {\n")
|
(insert "digraph \"org-roam\" {\n")
|
||||||
(dolist (option org-roam-grapher-extra-options)
|
(dolist (option org-roam-graph-extra-config)
|
||||||
(insert (concat (car option)
|
(insert (concat (car option)
|
||||||
"="
|
"="
|
||||||
(cdr option)
|
(cdr option)
|
||||||
|
|
Loading…
Reference in a new issue