Skip to content

Commit

Permalink
merged pull request org-roam#227 to fix issue org-roam#202
Browse files Browse the repository at this point in the history
  • Loading branch information
jsntn committed Nov 18, 2024
1 parent 48e1005 commit 7743d57
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion org-roam-ui.el
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ This serves the web-build and API over HTTP."
:group 'org-roam-ui
:init-value nil
(cond
(org-roam-ui-mode
((and org-roam-ui-mode (not (org-roam-ui-server-runningp)))
;;; check if the default keywords actually exist on `orb-preformat-keywords'
;;; else add them
(setq-local httpd-port org-roam-ui-port)
Expand All @@ -201,6 +201,10 @@ 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-server-runningp ()
"True if the server is running or listening, otherwise false."
(if (member (process-status org-roam-ui-ws-server) '(listen run)) t))

(defun org-roam-ui--ws-on-open (ws)
"Open the websocket WS to org-roam-ui and send initial data."
(progn
Expand Down

0 comments on commit 7743d57

Please sign in to comment.