0

I am trying to move *** b3 from this state:

* a1
** a2

* b1
** b2
*** b3

to this state:

* a1
** a2
*** b3

* b1
** b2

But I can't do that with (org-refile), because it allows me to only target * a1

** a2 is NOT an option, only * a1 from the a-branch is available to select from the minibuffer menu, ** a2 subheader is NOT available for selection.

Any idea how to org-refile b3 under a2?

2 Answers 2

1

avy-org-refile-as-child does it for me. I think avy comes with a standard spacemacs installation, at least I don't recall adding it. With the cursor on the line you wish to refile, call the function and then all visible headings are notated with a keyboard shortcut. Simply press the shortcut corresponding to where you wish the line to be moved. If there is content under the heading to be moved, this should be folded before attempting the refile.

FWIW I think the answer from Malle Yeno is a better one as a) I think I forgot about having upped the number of refile target headings, and b) it works better in cases when the refile target is further from the source.

1
  • 1
    Can you please add more information about this? Where does one get it? How does it solve the OP's problem? I realize that the OP accepted it, but it's not clear to me that the answer would be useful to anybody else as it stands.
    – NickD
    Jul 18 at 1:32
1

You will have to set your org-refile-use-outline-path to non-nil.

From the documentation:

Non-nil means provide refile targets as paths.

So a level 3 headline will be available as level1/level2/level3.

When the value is file, also include the file name (without directory)
into the path.  In this case, you can also stop the completion after
the file name, to get entries inserted as top level in the file.

When full-file-path, include the full file path.

When buffer-name, use the buffer name.

If you do not see your headings in the refile targets, you will have to also set org-refile-targets to be for the right header levels. For example,

((nil :maxlevel . 3)
 (org-agenda-files :maxlevel . 3))

will target your org-agenda files to the third level of headings for refile.

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.