summaryrefslogtreecommitdiff
path: root/org-roam-ui.el
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-07-29 09:18:25 +0200
committerThomas F. K. Jorna <[email protected]>2021-07-29 09:18:25 +0200
commitbf109b6dc016eb386fe86cbde9578734bcb6c99d (patch)
tree273d4b4b912cd247e4d0bcb2720118a4ddb3c983 /org-roam-ui.el
parent2542425a74c13f10af62efbb08032772aa2d7850 (diff)
added minibuf check
Diffstat (limited to 'org-roam-ui.el')
-rw-r--r--org-roam-ui.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/org-roam-ui.el b/org-roam-ui.el
index 12a1623..4084f43 100644
--- a/org-roam-ui.el
+++ b/org-roam-ui.el
@@ -125,6 +125,7 @@ This serves the web-build and API over HTTP."
(defun org-roam-ui--send-graphdata ()
+ "Get roam data, make JSON, send through websocket to org-roam-ui."
(let* ((nodes-columns [id file title level])
(links-columns [source dest type])
(nodes-db-rows (org-roam-db-query `[:select ,nodes-columns :from nodes]))
@@ -135,18 +136,22 @@ This serves the web-build and API over HTTP."
(defun org-roam-ui--update-current-node ()
(let* ((node (org-roam-id-at-point)))
+ (unless (string-match-p (regexp-quote "Minibuf") (current-buffer))
(unless (string= org-roam-ui--ws-current-node node)
(setq org-roam-ui--ws-current-node node)
- (websocket-send-text oru-ws (json-encode `((type . "command") (data . ((commandName . "follow") (id . ,node)))))))))
+ (websocket-send-text oru-ws (json-encode `((type . "command") (data . ((commandName . "follow") (id . ,node))))))))))
(defun org-roam-ui-show-node ()
+ "Open the current org-roam node in org-roam-ui."
(interactive)
(websocket-send-text oru-ws (json-encode `((type . "command") (data . ((commandName . "follow") (id . ,(org-roam-id-at-point))))))))
(defun org-roam-ui-sync-theme--advice ()
+ "Function which is called after load-theme to sync your current theme with org-roam-ui."
(websocket-send-text oru-ws (json-encode `((type . "theme") (data . ,(org-roam-ui--update-theme))))))
(defun org-roam-ui-sync-theme-manually ()
+ "Sync your current Emacs theme with org-roam-ui."
(interactive)
(websocket-send-text oru-ws (json-encode `((type . "theme") (data . ,(org-roam-ui--update-theme))))))