# Single page result of filtering

**URL:** <https://org-roam.discourse.group/t/single-page-result-of-filtering/2940>\
**Category:** How To\
**Created:** [January 10, 2023, 12:36pm UTC](https://org-roam.discourse.group/t/single-page-result-of-filtering/2940 "2023-01-10T12:36:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrepetto94](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/mrepetto94/32/1279_2.png) [@mrepetto94](https://org-roam.discourse.group/u/mrepetto94)\
**Post date:** [January 10, 2023, 12:36pm UTC](https://org-roam.discourse.group/t/single-page-result-of-filtering/2940/1 "2023-01-10T12:36:49Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [January 10, 2023, 5:55pm UTC](https://org-roam.discourse.group/t/single-page-result-of-filtering/2940/2 "2023-01-10T17:55:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mrepetto94](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/mrepetto94/32/1279_2.png) [@mrepetto94](https://org-roam.discourse.group/u/mrepetto94)\
**Post date:** [January 11, 2023, 6:08am UTC](https://org-roam.discourse.group/t/single-page-result-of-filtering/2940/3 "2023-01-11T06:08:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [January 11, 2023, 6:13pm UTC](https://org-roam.discourse.group/t/single-page-result-of-filtering/2940/4 "2023-01-11T18:13:00Z")

</div>

You are right.

For both of your use cases, I would probably use [Org-transclusion](https://github.com/nobiot/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

```auto
(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:

```auto
#+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.

---

<div class="post-metadata">

**Author:** ![mrepetto94](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/mrepetto94/32/1279_2.png) [@mrepetto94](https://org-roam.discourse.group/u/mrepetto94)\
**Post date:** [January 12, 2023, 7:03am UTC](https://org-roam.discourse.group/t/single-page-result-of-filtering/2940/5 "2023-01-12T07:03:53Z")

</div>

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