I understand I can use org-map-entries and use with-current-buffer and get the marker then refile using RFLOC. I don't want to advice.

Is there a command I can use?

This would be awesome if they added this to org-refile:

(org-refile nil nil (list "Heading/Sub" "~/somefile.org" nil '("Heading" "Sub")))

I know this is not valid because it's not an integer or marker but it would be awesome if they allowed an olp in RFLOC. Is there a way to get an RFLOC that could be used with org-refile, given an outline path specification?

  • And the question is? You won't get anywhere asking for enhancements to Org mode on Emacs SE. You need to do it where it might make a difference: on the Org mode ML.
    – NickD
    May 13, 2023 at 3:06
  • ok, will do thanks. I was wondering if there was a command that I did not know about first.
    – Rick
    May 13, 2023 at 3:16
  • You should be able to do it by writing a function to calculate the position given the olp specification, constructing an RFLOC and passing that to org-refile - maybe? There might be such a function (or at least the code for such a function) in the file+olp handler in org-capture - org-find-olp sounds promising.
    – NickD
    May 13, 2023 at 9:05
  • I edited your question to steer it towards the way I suggested in my comment (and make it a question suitable for Emacs SE). Revert if you disagree.
    – NickD
    May 13, 2023 at 9:10


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.