Files created by org-journal
are not picked up by org-roam
#133
-
I recently have been wrestling with my org-journal files and dynamically adding all my org-roam files with TODOs in them to be included into my org-agenda-files, including my org-journal files that are in a sub directory in org-roam. I have the exact implementation from (https://gist.github.com/d12frosted/a60e8ccb9aceba031af243dff0d19b2e) implemented. The adding and removing of the tags works great. I have an issue with getting the tags from The provided function: (defun vulpea-project-files ()
"Return a list of note files containing 'project' tag." ;
(seq-uniq
(seq-map
#'car
(org-roam-db-query
[:select [nodes:file]
:from tags
:left-join nodes
:on (= tags:node-id nodes:id)
:where (like tag (quote "%\"project\"%"))])))) And the supporting functions that call it : (defun vulpea-agenda-files-update (&rest _)
"Update the value of `org-agenda-files'."
(setq org-agenda-files (vulpea-project-files)))
(add-hook 'find-file-hook #'vulpea-project-update-tag)
(add-hook 'before-save-hook #'vulpea-project-update-tag)
(advice-add 'org-agenda :before #'vulpea-agenda-files-update)
(advice-add 'org-todo-list :before #'vulpea-agenda-files-update) I am going to try and provide everything I can about the org file. Major mode is org-journal, as I created this file from calling org-journal's My attempts to use different functions for (defun vulpea-project-files ()
"Return a list of note files that are part of `org-agenda'."
(seq-map
#'vulpea-note-path
(vulpea-db-query-by-tags-every '("project")))) (defun vulpea-project-files ()
"Return a list of note files that are part of `org-agenda'."
(seq-map
#'vulpea-note-path
(vulpea-db-query-by-tags-some '("project")))) All 3 functions are not finding that org file for some reason. Any help here would be great. I feel like I am so close to achieving what I want, and this is the last hi-cup. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Answer to this question is located in comments. Hey, Everything seems fine. Especially if you can (org-roam-db-query
[:select *
:from tags
:where (= node-id "d147530a-294c-4bcc-ad69-dec962462869")]) (org-roam-db-query
[:select [id file title]
:from nodes
:where (= id "d147530a-294c-4bcc-ad69-dec962462869")]) |
Beta Was this translation helpful? Give feedback.
Answer to this question is located in comments.
Hey,
Everything seems fine. Especially if you can
org-roam-node-find
it 😸 Basically, the first directorg-roam-db-query
should work because it doesn't rely on setting up anything extra. Unlikevulpea
functions that require some setup and I don't know if you did it properly. So just to narrow us, can you please share result of the following scripts?