I would like to be able to insert an org link into my roam files which can be clicked on in order to show a certain subset of available roam files (e.g. all those having the tag "foo"). Is there currently any way to accomplish this?

The use-case would be to be able to create a categorized list of tags in my Index.org file that can be clicked on to bring up all files containing a particular tag.

  • You can create a link like [[elisp:(my/function-here "foo")]] which calls an arbitrary function to do the search. What is missing in your question is how to specify the list of files to search: how do you specify the list of available roam files? Org mode provides facilities to search e.g. all agenda files (files in the org-agenda-files list), but no specific facilitites to e.g. search all files in the filesystem. You can do the latter with generic emacs facilities but you probably don't want to: it is going to be slow.
    – NickD
    Jan 3 at 13:33
  • @NickD I'm not asking how to do this with Org files in general, but how to do it with org-roam, which maintains its own database of files and tags. I was hoping that there were already functions in place as part of org-roam that would make this possible (or at least make it easy to implement the my/function-here function you referred to).
    – Mark
    Jan 3 at 21:00
  • You are right: I know very little about org-roam, so I was extrapolating from what I know about basic Org mode. There might be some people here who know more about it, but you also might want to open an issue on the org-roam Github site: you might get an org-roam expert or two there who might be able to help. If you get an answer there, you can come back and add your own answer here.
    – NickD
    Jan 4 at 2:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.