summaryrefslogtreecommitdiff
path: root/org-roam-ui.el
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-10-06 13:17:43 +0200
committerThomas F. K. Jorna <[email protected]>2021-10-06 13:17:43 +0200
commitbae6487afd5e6eec9f04b38b235bbac24042ca62 (patch)
treedf6a72d934f8731f86524f2812481b8bcdfebd25 /org-roam-ui.el
parent0f22a091900c803fbca5023c56be923a2bafc248 (diff)
feat: filter dailes (#68)
Diffstat (limited to 'org-roam-ui.el')
-rw-r--r--org-roam-ui.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/org-roam-ui.el b/org-roam-ui.el
index 2cde148..f363331 100644
--- a/org-roam-ui.el
+++ b/org-roam-ui.el
@@ -219,6 +219,7 @@ This serves the web-build and API over HTTP."
(remove-hook 'after-save-hook #'org-roam-ui--on-save)
(org-roam-ui-follow-mode -1)))))
+
(defun org-roam-ui--on-save ()
"Send graphdata on saving an org-roam buffer."
(when (org-roam-buffer-p)
@@ -378,6 +379,15 @@ unchanged."
org-roam-ui-custom-theme))
ui-theme))
+
+(defun org-roam-ui--send-variables (ws)
+ "Send org-roam variables through the websocket WS."
+ (when (boundp 'org-roam-dailies-directory)
+ (websocket-send-text ws (json-encode `((type . "variables")
+ (data .
+ (("daily-directory" . ,(concat org-roam-directory org-roam-dailies-directory))
+ ("org-roam-directory" . ,org-roam-directory))))))))
+
(defun org-roam-ui-sql-to-alist (column-names rows)
"Convert sql result to alist for json encoding.
ROWS is the sql result, while COLUMN-NAMES is the columns to use."
@@ -394,6 +404,8 @@ ROWS is the sql result, while COLUMN-NAMES is the columns to use."
(setq rows nil)))
res))
+
+
;; (defservlet* id/:id text/html ()
;; (let ((node (org-roam-populate (org-roam-node-create :id id)))
;; html-string)