From org-refile to a known fixed location I have learned that the argument RFLOC looks like this:
'(heading file regular-expression position-of-target-heading)
I am trying to programmatically refile a subtree to become the child of a given heading. This is easy, manually, as long as I have (file :maxlevel . 1) as part of the org-refile-targets.
With point on the heading of the subtree, I call (org-refile nil nil ("Projects" "/tmp/projects.org" nil nil)). This does refile to the /tmp/projects.org file but the refiled subtree becomes a sibling of Projects, not a child.
How can I change my code so that the subtree properly moves under Projects ?