From 1d66292f8f16af75ac878a94a87abf9e56ee38ea Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Thu, 22 Jul 2021 18:37:41 +0200 Subject: added eventsource node tracking --- org-roam-ui.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'org-roam-ui.el') 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. -- cgit v1.2.3