-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Org-roam-ui doesn't show the node's text if in a .dir-locals.el location #236
Comments
I had the same issue. And I find that it's better to use relative path in
Besides, after changing roam directory, try to refresh both roam directory and reload emacs, i.e. use |
I'll try that out later today; I though |
Unfortunately that doesn't work. |
same problem here |
same here, ((nil . ((eval . (setq-local
org-roam-directory (expand-file-name "notes/net" (locate-dominating-file
default-directory ".dir-locals.el"))))
(eval . (setq-local
org-roam-db-location (expand-file-name "org-roam.db"
org-roam-directory))))))
httpd server reports: (request
(date "Sun, 10 Jul 2022 21:04:28 GMT")
(address "127.0.0.1")
(get "/node/5e80de0b-1b4a-4510-9829-be201f4b7f03")
(headers
("GET" "/node/5e80de0b-1b4a-4510-9829-be201f4b7f03" "HTTP/1.1")
("Host" "localhost:35901")
("User-Agent" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0")
("Accept" "*/*")
("Accept-Language" "en-US,en;q=0.5")
("Accept-Encoding" "gzip, deflate, br")
("Referer" "http://localhost:35901/")
("Connection" "keep-alive")
("Sec-Fetch-Dest" "empty")
("Sec-Fetch-Mode" "cors")
("Sec-Fetch-Site" "same-origin")
("Content" "")))
(error 500
(wrong-type-argument number-or-marker-p nil))
|
my settings: ;; ---(org-roam)------------------------------------------------------------------------
;; @see: https://systemcrafters.net/build-a-second-brain-in-emacs/5-org-roam-hacks/
(use-package org-roam
:ensure t
:init
(setq org-roam-v2-ack t)
:custom
(org-roam-directory (file-truename "~/Dropbox/Local/data/org/net"))
;;(org-roam-completion-everywhere t)
:bind (("C-c n l" . org-roam-buffer-toggle)
("C-c n f" . org-roam-node-find)
("C-c n g" . org-roam-graph)
("C-c n i" . org-roam-node-insert)
("C-c n c" . org-roam-capture)
;; Dailies
("C-c n j" . org-roam-dailies-capture-today)
;; :map org-mode-map
;; ("C-M-i" . completion-at-point)
;; :map org-roam-dailies-map
;; ("Y" . org-roam-dailies-capture-yesterday)
;; ("T" . org-roam-dailies-capture-tomorrow)
)
;; :bind-keymap
;; ("C-c n d" . org-roam-dailies-map)
:config
;; (require 'org-roam-dailies) ;; Ensure the keymap is available
;; If you're using a vertical completion framework, you might want a more informative completion interface
(setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag)))
(setq org-roam-capture-templates
'(
("d" "default" plain
"%?"
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n")
:unnarrowed t)
("s" "system" plain
"* Info\n\n- Module: ${title}\n- OS: %^{os}\n- Layer: %^{layer}\n- Zone: %^{zone}\n- Version: %^{version}\n\n* Related:\n\n- \n\n* Bindings:\n\n- %?\n\n* References:\n\n- "
:if-new (file+head "system/%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n")
:unnarrowed t)
("v" "devel" plain
"* Info\n\n- Module: ${title}\n- Lang: %^{lang}\n- Frame: %^{frame}\n- Context: %^{context}\n- Version: %^{version}\n\n* Related:\n\n- \n\n* Bindings:\n\n- %?\n\n* References:\n\n- "
:if-new (file+head "devel/%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n")
:unnarrowed t)
("b" "book notes" plain
"\n* Source\n\nAuthor: %^{Author}\nTitle: ${title}\nYear: %^{Year}\n\n* Summary\n\n%?"
:if-new (file+head "refs/%<%Y%m%d%H%M%S>-b-${slug}.org" "#+title: ${title}\n")
:unnarrowed t)
("l" "Online link" plain
"\n* Source\n\nTitle: ${title}\nURL: %^{URL}\n\n* Summary\n\n%?"
:if-new (file+head "refs/%<%Y%m%d%H%M%S>-l-${slug}.org" "#+title: ${title}\n")
:unnarrowed t)
))
(org-roam-db-autosync-mode)
;; If using org-roam-protocol
(require 'org-roam-protocol))
;; ---(http server)------------------------------------------------------------------------
(use-package websocket
:after org-roam
;; :straight (:host github :repo "ahyatt/emacs-websocket" :branch "main")
)
(use-package simple-httpd
:after org-roam
)
;; ---(org-roam-ui)------------------------------------------------------------------------
(use-package org-roam-ui
:ensure t
;; :straight
;; (:host github :repo "org-roam/org-roam-ui" :branch "main" :files ("*.el" "out"))
:quelpa (org-roam-ui :fetcher github :repo "org-roam/org-roam-ui")
:after org-roam
;; ;; normally we'd recommend hooking orui after org-roam, but since org-roam does not have
;; ;; a hookable mode anymore, you're advised to pick something yourself
;; ;; if you don't care about startup time, use
;; :hook (after-init . org-roam-ui-mode)
:config
(setq org-roam-ui-sync-theme t
org-roam-ui-follow t
org-roam-ui-update-on-save t
org-roam-ui-open-on-start t))
|
That's what is causing that?! I'll have to debug this soon. |
I got similar error as reported by @hute37. The error does not show in the The graph/linkages are correctly generated, but not the content in the .org file.
|
I've tried this setup too and encountered the same issue: The node info cannot be shown (resulting in that documented error 500), though the nodes themselves are displayed in the graph correctly. The org-roam manual says org-roam-directory needs to be absolute paths. |
Same issue here, did anybody figure out a fix? |
Unfortunately no, I just consolidated my org files under a single repo that I wanted org-roam functionality. My emacs-fu is just not good enough to properly solve the issue. |
Same problem here, is there anyone who found a fix? |
Same issue here, I have this in my
|
Same issue here. If set |
An interesting approach to project based org-mode todo/agenda management is taken by Sylvain Rousseau emacs package. I also use this setting: (setq org-agenda-files "~/.emacs-agenda.txt") where this file (not a list!), contains the list of my (project based) org-mode todo agenda files
|
UPDATE: I think I figured out this issue from my use case. Background:I set the
And once I would like to check and see this graphical org-roam-ui, I I have multiple Org-roam databases and the Fix:I kill all the processes of 'httpd' and 'websocket', and do Before I switch to another buffer, in order to initiate the new |
I simply call this function manually as a workaround, then reload the web page in my browser:
|
Hello, me too I have this problem. Is this stale or did somebody find a fix? |
I think I found a fix. As far as my understanding goes, the httpd server is running in some other directory, On startup of org-roam-ui-mode though, the org-roam-directory variable is set accorrdingly. Therefore my idea was to save the value of org-roam-directory at startup of org-roam-ui-mode Define new variable
Save value of org-roam-directory inside org-roam-ui--roam-directory
Set value of org-roam-directory when serving
|
I am trying to have more than one org-roam directory using a .dir-local file in such directory. When I define
(setq org-roam-directory (file-truename "~/repos/org-roam"))
in my config, and I'm in that set of roam files, org-roam-ui works great and as expected. And so does org-roam-graph.If I then switch to my .dir-local set of roam files, the graph displays, I can jump to a node in emacs, but I get displayed:
I don't know if this means anything, but org-roam-graph also does not work in the .dir-local set. It generates a correct .dot file in /tmp, but then does not successfully generate the .svg file as expected.
Here's what's in the
.dir-locals.el
file:The text was updated successfully, but these errors were encountered: