diff options
author | Thomas F. K. Jorna <[email protected]> | 2021-07-22 18:37:41 +0200 |
---|---|---|
committer | Thomas F. K. Jorna <[email protected]> | 2021-07-22 18:37:41 +0200 |
commit | 1d66292f8f16af75ac878a94a87abf9e56ee38ea (patch) | |
tree | 0e48f3d6104d97f7482a7435bd5fb4349f9213fd /org-roam-ui.el | |
parent | 83ebd530f2137bd0f282e0e27bfc58aac1bf2341 (diff) |
added eventsource node tracking
Diffstat (limited to 'org-roam-ui.el')
-rw-r--r-- | org-roam-ui.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/org-roam-ui.el b/org-roam-ui.el index 80991ad..fe012f6 100644 --- a/org-roam-ui.el +++ b/org-roam-ui.el @@ -115,9 +115,11 @@ ROWS is the sql result, while COLUMN-NAMES is the columns to use." (setq html-string (org-export-as 'html))) (insert html-string))) -(defservlet* current-node-data text/event-stream () +(defservlet* current-node-id text/event-stream () (insert (format "data: %s\n\n" - org-roam-ui-current-node-id))) + org-roam-ui-current-node-id)) + (httpd-send-header t "text/event-stream" 200 :Access-Control-Allow-Origin "*") + ) (defun org-roam-ui-update () "Track changes within Emacs to update Org-roam UI. |