# Use this instead of org-roam-refile

**URL:** <https://org-roam.discourse.group/t/use-this-instead-of-org-roam-refile/3588>\
**Category:** How To\
**Created:** [September 18, 2024, 10:38pm UTC](https://org-roam.discourse.group/t/use-this-instead-of-org-roam-refile/3588 "2024-09-18T22:38:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmg](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@dmg](https://org-roam.discourse.group/u/dmg)\
**Post date:** [September 18, 2024, 10:38pm UTC](https://org-roam.discourse.group/t/use-this-instead-of-org-roam-refile/3588/1 "2024-09-18T22:38:40Z")

</div>

once you have a lot of nodes, org-roam-refile is not very usable because you can’t provide a function to filter the nodes. It also does something that org-refile already does. So I wrote this function with you might find useful. THe function uses org-refile. If the first parameter is true, it places point in the destination. An optional filter function can be used. This way you can significantly narrow the potential destinations (e.g. I have several “Archival” files with filetag archival.

```
 (defun dmg-org-roam-refile (&optional p-visit filter-function)
   "refile current header as a child of a node.
 
 if P_VISIT is t, place point a destination.
 FILTER-FUNCTION allows you to narrow the potential destinations. See org-roam-node-find for an explanation of how it works.

 See org-refile for further configuration (e.g. location where subtree is placed within destionation)
"
(interactive)
(let* ( ;
    (node (org-roam-node-read nil filter-function nil 'require-match))
    (file (org-roam-node-file node))
    (title (org-roam-node-title node))
    (point (org-roam-node-point node))
    )
  (org-refile nil nil (list title file nil point))
  (if p-visit 
    (org-refile '(16) ))
 ))

```

---

<div class="post-metadata">

**Author:** ![akashp](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/akashp/32/1383_2.png) [@akashp](https://org-roam.discourse.group/u/akashp)\
**Post date:** [September 22, 2024, 8:10am UTC](https://org-roam.discourse.group/t/use-this-instead-of-org-roam-refile/3588/2 "2024-09-22T08:10:34Z")

</div>

Hi Professeur - I want to ask what problems does org-roam-refile have in your opinion - I never knew of this functionality just got to know about it, it pushes a headline along with its contents to a node it seems, what kind of problem does it possess for large node size?

---

<div class="post-metadata">

**Author:** ![dmg](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@dmg](https://org-roam.discourse.group/u/dmg)\
**Post date:** [September 22, 2024, 5:24pm UTC](https://org-roam.discourse.group/t/use-this-instead-of-org-roam-refile/3588/3 "2024-09-22T17:24:51Z")

</div>

Please call me Daniel. The main problem is that it does not allow for filter-node function (like org-roam-node-find). My use case is the following: I want to move nodes from my inbox (where I quickly add them) and then later decide where they go. But I only have a very small number of potential destionations (Projects and Areas–I use a hybrid of PARA/GTD). This way I can filter nodes and only show the Projects or Areas nodes. Does it make sense?

---

<div class="post-metadata">

**Author:** ![akashp](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/akashp/32/1383_2.png) [@akashp](https://org-roam.discourse.group/u/akashp)\
**Post date:** [September 22, 2024, 5:33pm UTC](https://org-roam.discourse.group/t/use-this-instead-of-org-roam-refile/3588/4 "2024-09-22T17:33:58Z")

</div>

Yes it does ofcourse. Thanks 🙂
