Single page result of filtering

I would love to filter my notes by tag and display the result in a single org. Is it possible to do it using org-roam? Or should I use another org-mode package for that?

If you are using embark package, I’d simply do the following:

  1. org-roam-node-find
  2. Manually filter the list by entering the tag “#tag
  3. embark-collect or embark-export to have the list in a separate buffer
  4. Create or go to an existing Org buffer, and move the point (cursor) where I want to insert the list
  5. insert-buffer and select the Embark buffer from step 3

I don’t know your specific reason why you would want to have such a list in an Org file. Embark-collect or Embark-export is a normal buffer, and yet, by moving around, you can open up the selected node – much like the minibuffer, but in a normal buffer.

Thank you nobiot!

I actually have two use cases in mind. The first is to org-export a single document composed of all nodes with the tag.

And the second would be to review all the notes in a single place, but I think this is not possible in the procedure you mentioned.

You are right.

For both of your use cases, I would probably use Org-transclusion. I would assume you won’t deal with 100s of nodes; probably 10-20 max?

I can only outline what I would try:

  1. Get a list of node IDs for a tag
    Assuming a single tag, the follwing SQL query returns the list
(org-roam-db-query [:select [node-id] :from tags :where (= tag "yourtag")])
  1. In a new buffer, activate Org-mode and iterate through the ID list and construct a string like this below:
#+transclude: [[ID: id-1]]
#+transclude: [[ID: id-2]]
...
#+transclude: [[ID: id-n]]
  1. Run org-transclusion-add-all
    You should get the content of all the nodes in the buffer as transclusions. You should be able to export this buffer and review the content in a single place.

I did not know about org-transclusion. Indeed this was what I was searching for; thank you so much!