emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Make org-paste-subtree more predictable and useful


From: Philipp Kiefer
Subject: Make org-paste-subtree more predictable and useful
Date: Tue, 17 Jan 2023 21:14:13 +0100

Hello there, orgmode list, this is my first contribution here, so please be gentle with me.

I've now used outlining software for the last twenty years at least and it is my belief that when a user pastes headlines into an outline, they usually want to make them either A) siblings of (i. e. paste them at the same level as) or B) children of (i. e. paste them one level below) the currently focused heading.

Unfortunately, org-paste-subtree currently attempts to "modify the level of the subtree to make sure the tree fits in nicely at the yank position" [from Org Manual]. For me, this has meant unpredictable results. As far as I know, there is currently no way to use the command while making sure the result will be A) or B) as desired. The user has to wait for the command to do its "magic" and then move the headings around manually to achieve the intended result.
With a numeric prefix argument or by yanking after a headline marker, the user can specify the yank level. But how likely is it that a user will yank headings to level five under a level two heading?

I can solve my problem with some additional code, in which I determine the level of the heading at point and then have two functions to call for same level or child level respectively, but it strikes me as odd that this is not part of the default options.

My suggestion would be to make a fundamental change to how the command works, prioritizing definite A) or B) type results over the current vague "the tree fits in nicely" approach. IMHO the default should be to yank at the same level as the focused heading. Then, if the C-u 0 numeric prefix (which currently produces an error message) were used to yank at one level below that (as subheadings of the focused heading), the functionality of the other numeric prefixes to set the yank level could be preserved.

Thanks for considering!

Best regards,

Philipp


reply via email to

[Prev in Thread] Current Thread [Next in Thread]