(feat): add org-roam-graphviz-extra-options (#269)
This commit is contained in:
parent
f5d5b83b49
commit
be1d1f1d7b
2 changed files with 18 additions and 0 deletions
|
@ -1,5 +1,10 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 1.0.0 (TBD)
|
||||||
|
|
||||||
|
## New Features
|
||||||
|
* [#269][gh-269] Add `org-roam-graphviz-extra-options`
|
||||||
|
|
||||||
## 1.0.0-rc1 (06-03-2020)
|
## 1.0.0-rc1 (06-03-2020)
|
||||||
|
|
||||||
This is a pre-release before the push to MELPA. It contains large
|
This is a pre-release before the push to MELPA. It contains large
|
||||||
|
@ -123,6 +128,7 @@ Mostly a documentation/cleanup release.
|
||||||
[gh-230]: https://github.com/jethrokuan/org-roam/pull/230
|
[gh-230]: https://github.com/jethrokuan/org-roam/pull/230
|
||||||
[gh-247]: https://github.com/jethrokuan/org-roam/pull/247
|
[gh-247]: https://github.com/jethrokuan/org-roam/pull/247
|
||||||
[gh-259]: https://github.com/jethrokuan/org-roam/pull/259
|
[gh-259]: https://github.com/jethrokuan/org-roam/pull/259
|
||||||
|
[gh-259]: https://github.com/jethrokuan/org-roam/pull/269
|
||||||
|
|
||||||
# Local Variables:
|
# Local Variables:
|
||||||
# eval: (auto-fill-mode -1)
|
# eval: (auto-fill-mode -1)
|
||||||
|
|
12
org-roam.el
12
org-roam.el
|
@ -1096,6 +1096,13 @@ Valid states are 'visible, 'exists and 'none."
|
||||||
:type 'string
|
:type 'string
|
||||||
:group 'org-roam)
|
:group 'org-roam)
|
||||||
|
|
||||||
|
(defcustom org-roam-graphviz-extra-options nil
|
||||||
|
"Extra options when contructing the Graphviz graph.
|
||||||
|
Example:
|
||||||
|
'((\"rankdir\" . \"LR\"))"
|
||||||
|
:type '(alist)
|
||||||
|
:group 'org-roam)
|
||||||
|
|
||||||
(defcustom org-roam-graph-max-title-length 100
|
(defcustom org-roam-graph-max-title-length 100
|
||||||
"Maximum length of titles in Graphviz graph nodes."
|
"Maximum length of titles in Graphviz graph nodes."
|
||||||
:type 'number
|
:type 'number
|
||||||
|
@ -1138,6 +1145,11 @@ into a digraph."
|
||||||
(org-roam-sql [:select :distinct [file-to file-from]
|
(org-roam-sql [:select :distinct [file-to file-from]
|
||||||
:from file-links]))))
|
:from file-links]))))
|
||||||
(insert "digraph \"org-roam\" {\n")
|
(insert "digraph \"org-roam\" {\n")
|
||||||
|
(dolist (option org-roam-graphviz-extra-options)
|
||||||
|
(insert (concat (car option)
|
||||||
|
"="
|
||||||
|
(cdr option)
|
||||||
|
";\n")))
|
||||||
(dolist (node nodes)
|
(dolist (node nodes)
|
||||||
(let* ((file (xml-escape-string (car node)))
|
(let* ((file (xml-escape-string (car node)))
|
||||||
(title (or (caadr node)
|
(title (or (caadr node)
|
||||||
|
|
Loading…
Reference in a new issue