diff options
author | Thomas F. K. Jorna <[email protected]> | 2021-08-16 12:33:01 +0200 |
---|---|---|
committer | Thomas F. K. Jorna <[email protected]> | 2021-08-16 12:33:01 +0200 |
commit | e57a19e17456f971ffec61a07613c7065c1c3abc (patch) | |
tree | a49f0250aab7b8f92c3ba985fe1968b0ba0d02b9 /org-roam-ui.el | |
parent | ccf8dd47bdb04289cce7ae690d9ce21c09254a01 (diff) |
fix:#65 include citet and citep keywords
Diffstat (limited to 'org-roam-ui.el')
-rw-r--r-- | org-roam-ui.el | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/org-roam-ui.el b/org-roam-ui.el index efea3af..d1bdd07 100644 --- a/org-roam-ui.el +++ b/org-roam-ui.el @@ -133,8 +133,8 @@ Defaults to #'browse-url." (defvar oru-ws nil "The websocket for org-roam-ui.") -(defvar org-roam-ui-ws - "The websocket server for org-roam-ui.") +;; (defvar org-roam-ui-ws nil +;; "The websocket server for org-roam-ui.") ;;;###autoload (define-minor-mode @@ -155,7 +155,6 @@ This serves the web-build and API over HTTP." (org-roam-ui-mode ;;; check if the default keywords actually exist on `orb-preformat-keywords' ;;; else add them - ;; (org-roam-ui--check-orb-keywords) ; (setq-local httpd-port org-roam-ui-port) (setq httpd-root org-roam-ui/app-build-dir) (httpd-start) @@ -298,7 +297,7 @@ unchanged." (links-db-rows (org-roam-db-query `[:select ,links-columns :from links :left :outer :join refs :on (= links:dest refs:ref) - :where (or (= links:type "id") (= links:type "cite"))])) + :where (in links:type ["cite", "citet", "citep", "id"])])) ;; Convert any cite links that have nodes with associated refs to an ;; id based link of type `ref' while removing the 'nil `refs:node-id' ;; from all other links @@ -307,7 +306,7 @@ unchanged." (if node-id (list source node-id "ref") (list source dest type)))) links-db-rows)) - (links-with-empty-refs (seq-filter (lambda (l) (equal (nth 2 l) "cite")) links-db-rows)) + (links-with-empty-refs (seq-filter (lambda (l) (string-match-p "cite" (nth 2 l))) links-db-rows)) (empty-refs (delete-dups (seq-map (lambda (l) (nth 1 l)) links-with-empty-refs))) (fake-nodes (seq-map 'org-roam-ui--create-fake-node empty-refs)) ;; Try to update real nodes that are reference with a title build from @@ -327,9 +326,7 @@ unchanged." (let* ((node (org-roam-id-at-point))) (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--update-theme () |