0

What I want is basically a programmatic version of org-refile, where I can pass in a string as input. Currently, org-refile doesn't provide this functionality.

extremeaxe5
  • 639
  • 3
  • 10
  • I do something like this all the time with an earlier version of org-mode, which I assume would probably work with newer versions. With no test data to work with in the question above (e.g., a minimal example), however, I hesitate to write something up. Where exactly do you want to refile something ... what exactly is being refiled ... underneath what heading ... is it the same file ... is anything changing to the subtree being refiled ... how about some test data that we can block and copy to use so that everyone participating in this forum thread is working on the same issue? – lawlist May 31 '20 at 22:53
  • I move items programmatically by let-binding the value for `org-archive-location` (e.g., `"/path/to/my-file.org::* TASKS"` and let-binding a `nil` value for `org-archive-save-context-info`, and then I call `org-archive-subtree`. If at some point this question gets updated with some test data, I may be able to put together an example of this method using a version of `org-mode` that ships with Emacs 26. I do not remember whether I made any modifications to my custom version to make everything work in terms of moving subtrees programmatically without altering the contents of the item moved. – lawlist May 31 '20 at 23:08

0 Answers0