Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to move a subtree to another subtree in org-mode emacs

Tags:

emacs

org-mode

I'd like to perform one simple task but there seems to be no clear solution for it:

I have a structure of subtrees like this:

* Tree A
** Subtree A1
** Subtree A2
* Tree B
** Subtree B1
** Subtree B2

I'd like to set up one key shortcut to move subtrees from Tree A to Tree B. Moving to the archive seems to be easy, but do you have any clue how to do it within one file?

Any help appreciated! Thanks!

like image 902
andrei Avatar asked Sep 22 '11 04:09

andrei


1 Answers

You could try to refill the subtree with C-c C-w (it work also to move the subtree to another file).

Another way is to fold the subtree, then to kill it with C-k C-k and to paste it where it should be.

The third solution I use some time is to change the level of the subtree with M-left, then to move it with M-up and M-down, then M-right put it again on the correct level. This third way have the shortcoming that some time it make other part of the tree to move.

like image 197
Rémi Avatar answered Oct 15 '22 18:10

Rémi