Hi Jeff, thanks for bringing up this issue, and thanks all for the input.
I pushed three small changes to the org-refile interface: 1. before prompting the user for a refile target, put the point at the beginning of the region/subtree to refile. This will make sure everyone understands we are refiling headlines, not text. 2. Improve the prompt itself, explicitely saying whether we are refiling a subtree or a region (containing subtree(s)). 3. Add a new option `org-refile-active-region-within-subtree' which, when turned on, allows the user to refile the active region, turning the first line into a headline using `org-toggle-heading'. I think these are improvements going in the right direction -- let me know what you think. On the overall, I'm with Nicolas in thinking that we need to be extra careful when we try to extend a functionality to heterogeneous elements. Nicolas Goaziou <n.goaz...@gmail.com> writes: > My point is that outside of its list, an item is just plain text. Yes! « Outside of the hive, a bee is just a fly. » (René Descartes) :) > Thus, why not take that into account? Instead of creating a magical > function to refile items anywhere, let's just extend `org-refile' to > work on a region of text which is not a sub-tree. This is what I tried to achieve with the new option. > At the moment, org-refile understands the concept of region, but checks > if that region holds a sub-tree. What about removing that check, and > adapt the code to text without trees? It will then be the user's problem > if he wants to match apples and oranges. Furthermore, as a side effect, > refiling an item would simply mean selecting it and using refile > interface. Thanks for this idea! Best, -- Bastien