org-yank

org-yank is an interactive compiled Lisp function in `org.el'.


(org-yank &optional ARG)

Yank. If the kill is a subtree, treat it specially.
This command will look at the current kill and check if is a single
subtree, or a series of subtrees[1]. If it passes the test, and if the
cursor is at the beginning of a line or after the stars of a currently
empty headline, then the yank is handled specially. How exactly depends
on the value of the following variables, both set by default.

org-yank-folded-subtrees
When set, the subtree(s) will be folded after insertion, but only
if doing so would now swallow text after the yanked text.

org-yank-adjusted-subtrees
When set, the subtree will be promoted or demoted in order to
fit into the local outline tree structure, which means that the level
will be adjusted so that it becomes the smaller one of the two
*visible* surrounding headings.

Any prefix to this command will cause `yank' to be called directly with
no special treatment. In particular, a simple C-u prefix will just
plainly yank the text as it is.

[1] The test checks if the first non-white line is a heading
and if there are no other headings with fewer stars.