Is there a way to limit the targets that are offered for org-refile to the currently visible sub-tree in a buffer that has been created with org-tree-to-indirect or org-narrow-to-subtree

The goal is to make re-organizing entries easier in a file with several large sub-trees.


I don't believe this is possible, alas. Setting org-refile-targets to something like ((nil . (:maxlevel . 5))) will make sure you're only offered targets from the original buffer, but both the indirect buffer and the narrowed view source their completion headings from the source buffer, alas.

If you haven't already changed the value of org-refile-targets, then the configuration I mention above will be very much like the default of ((nil . (:level . 1))).

My best suggestion, frankly, is helm -- perhaps you are already using it? With helm fuzzy-matching, I find it very fast to narrow my subtree selection to a given path, even with a large number of large subtrees available.

  • No I haven't used helm yet, but I use ido (with flex matching) and just noticed that I can also activate that for org-refile using org-completion-use-ido. Do you know if Helm work fundamentally different for that purpose?
    – timor
    May 3 '16 at 7:47
  • Ah, I don't use ido+flex, so I'm not totally sure -- but from what I've read, flex+ido would serve you fairly well.
    – Gastove
    May 3 '16 at 16:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.