all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Make org-paste-subtree more predictable and useful
@ 2023-01-17 20:14 Philipp Kiefer
  2023-01-18  8:04 ` Ihor Radchenko
  0 siblings, 1 reply; 13+ messages in thread
From: Philipp Kiefer @ 2023-01-17 20:14 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1889 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 2175 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Make org-paste-subtree more predictable and useful
  2023-01-17 20:14 Make org-paste-subtree more predictable and useful Philipp Kiefer
@ 2023-01-18  8:04 ` Ihor Radchenko
  2023-01-18 15:41   ` Philipp Kiefer
  0 siblings, 1 reply; 13+ messages in thread
From: Ihor Radchenko @ 2023-01-18  8:04 UTC (permalink / raw)
  To: Philipp Kiefer; +Cc: emacs-orgmode

Philipp Kiefer <phil.kiefer@gmail.com> writes:

> 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].
> ...
> 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.

AFAIU, `org-paste-subtree' already does what you want for the most part.
See the function docstring:

    Paste the clipboard as a subtree, with modification of headline level.
    
    The entire subtree is promoted or demoted in order to match a new headline
    level.
    
    If the cursor is at the beginning of a headline, the same level as
    that headline is used to paste the tree.
    
    If not, the new level is derived from the *visible* headings
    before and after the insertion point, and taken to be the inferior headline
    level of the two.  So if the previous visible heading is level 3 and the
    next is level 4 (or vice versa), level 4 will be used for insertion.
    This makes sure that the subtree remains an independent subtree and does
    not swallow low level entries.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Make org-paste-subtree more predictable and useful
  2023-01-18  8:04 ` Ihor Radchenko
@ 2023-01-18 15:41   ` Philipp Kiefer
  2023-01-19  9:44     ` Ihor Radchenko
  0 siblings, 1 reply; 13+ messages in thread
From: Philipp Kiefer @ 2023-01-18 15:41 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2919 bytes --]

Thanks for addressing my concern, Ihor.

So I can force same-level yank by navigating to the beginning of the 
current headline before calling org-paste-subtree, I see. However, I 
still do not see a way to force it to paste one level below the current 
headline, i. e. to add the trees on the clipboard as child-subtrees or 
the current heading.

My best bet currently is probably to create a blank child heading, add 
some text (there seems to be a glitch turning the blank heading into an 
empty line when pasting with point on the blank dummy heading when it 
has no text), go back to the beginning of the line, then paste the 
subtrees at the level of the dummy heading, navigate back to the dummy 
heading and delete it. I'd really rather not have to do all that to 
achieve my simple goal of pasting subtrees at child level.

As for the claim that the current procedure "makes sure that the subtree 
remains an independent subtree and does not swallow low level entries.", 
either I don't understand it or it isn't true. If I have a level 2 
heading below which is a level 5 heading and I paste subtrees with point 
on the level 2 heading, the level 5 heading is subsumed under the last 
subtree yanked from the clipboard in all cases.

Best,

Philipp

On 18.01.2023 09:04, Ihor Radchenko wrote:
> Philipp Kiefer<phil.kiefer@gmail.com>  writes:
>
>> 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].
>> ...
>> 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.
> AFAIU, `org-paste-subtree' already does what you want for the most part.
> See the function docstring:
>
>      Paste the clipboard as a subtree, with modification of headline level.
>      
>      The entire subtree is promoted or demoted in order to match a new headline
>      level.
>      
>      If the cursor is at the beginning of a headline, the same level as
>      that headline is used to paste the tree.
>      
>      If not, the new level is derived from the *visible* headings
>      before and after the insertion point, and taken to be the inferior headline
>      level of the two.  So if the previous visible heading is level 3 and the
>      next is level 4 (or vice versa), level 4 will be used for insertion.
>      This makes sure that the subtree remains an independent subtree and does
>      not swallow low level entries.
>

[-- Attachment #2: Type: text/html, Size: 3744 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Make org-paste-subtree more predictable and useful
  2023-01-18 15:41   ` Philipp Kiefer
@ 2023-01-19  9:44     ` Ihor Radchenko
  2023-01-19 17:31       ` Philipp Kiefer
  0 siblings, 1 reply; 13+ messages in thread
From: Ihor Radchenko @ 2023-01-19  9:44 UTC (permalink / raw)
  To: Philipp Kiefer; +Cc: emacs-orgmode

Philipp Kiefer <phil.kiefer@gmail.com> writes:

> Thanks for addressing my concern, Ihor.
>
> So I can force same-level yank by navigating to the beginning of the 
> current headline before calling org-paste-subtree, I see. However, I 
> still do not see a way to force it to paste one level below the current 
> headline, i. e. to add the trees on the clipboard as child-subtrees or 
> the current heading.
>
> My best bet currently is probably to create a blank child heading, add 
> some text (there seems to be a glitch turning the blank heading into an 
> empty line when pasting with point on the blank dummy heading when it 
> has no text), go back to the beginning of the line, then paste the 
> subtrees at the level of the dummy heading, navigate back to the dummy 
> heading and delete it. I'd really rather not have to do all that to 
> achieve my simple goal of pasting subtrees at child level.

Just paste the subtree and press C-S-<right> to demote it immediately.
It would not save you many keystrokes if there was yet another prefix
argument.

> As for the claim that the current procedure "makes sure that the subtree 
> remains an independent subtree and does not swallow low level entries.", 
> either I don't understand it or it isn't true. If I have a level 2 
> heading below which is a level 5 heading and I paste subtrees with point 
> on the level 2 heading, the level 5 heading is subsumed under the last 
> subtree yanked from the clipboard in all cases.

Sorry, but I cannot reproduce.
Could you please provide detailed instructions about what you did?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Make org-paste-subtree more predictable and useful
  2023-01-19  9:44     ` Ihor Radchenko
@ 2023-01-19 17:31       ` Philipp Kiefer
  2023-01-20 10:12         ` [BUG] org-paste-subtree level when point is in the middle of a heading (was: Make org-paste-subtree more predictable and useful) Ihor Radchenko
  2023-01-20 10:21         ` [FR] Add C-u and C-u C-u prefix arguments to org-paste-subtree " Ihor Radchenko
  0 siblings, 2 replies; 13+ messages in thread
From: Philipp Kiefer @ 2023-01-19 17:31 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2864 bytes --]

I've uploaded two screencasts to illustrate the issues described in my 
last message:

1. Org Mode-paste subtree low-level item swallowed: 
https://imgur.com/a/CZ5lDaH . This relates to what I assume the passage 
from the manual is trying to say should not happen:

"makes sure that the subtree
remains an independent subtree and does not swallow low level entries."

2. Org Mode-paste subtree on empty heading glitch: 
https://imgur.com/a/AT5pDj6 . See my last message.

Further, you suggest I use C-S-<right> to demote the subtree after 
pasting it at the same level as the subtree at point. But what if I used 
a numerical prefix argument to copy or cut several subtrees, maybe 5 or 
10? Not very convenient at all to demote them all by hand...

I still hold that pasting headings / subtress either at the same level 
or at the child level of the target heading is part of the bread and 
butter of outline editing and should be as straightforward as possible. 
I'm rather sure the current numeric prefixes of org-paste-subtree to 
select a distinct level at which to paste are needed / used much less 
frequently than a "paste at child level" prefix (maybe C-u C-u?) would 
be if it was implemented.

Best

Philipp


On 19.01.2023 10:44, Ihor Radchenko wrote:
> Philipp Kiefer<phil.kiefer@gmail.com>  writes:
>
>> Thanks for addressing my concern, Ihor.
>>
>> So I can force same-level yank by navigating to the beginning of the
>> current headline before calling org-paste-subtree, I see. However, I
>> still do not see a way to force it to paste one level below the current
>> headline, i. e. to add the trees on the clipboard as child-subtrees or
>> the current heading.
>>
>> My best bet currently is probably to create a blank child heading, add
>> some text (there seems to be a glitch turning the blank heading into an
>> empty line when pasting with point on the blank dummy heading when it
>> has no text), go back to the beginning of the line, then paste the
>> subtrees at the level of the dummy heading, navigate back to the dummy
>> heading and delete it. I'd really rather not have to do all that to
>> achieve my simple goal of pasting subtrees at child level.
> Just paste the subtree and press C-S-<right> to demote it immediately.
> It would not save you many keystrokes if there was yet another prefix
> argument.
>
>> As for the claim that the current procedure "makes sure that the subtree
>> remains an independent subtree and does not swallow low level entries.",
>> either I don't understand it or it isn't true. If I have a level 2
>> heading below which is a level 5 heading and I paste subtrees with point
>> on the level 2 heading, the level 5 heading is subsumed under the last
>> subtree yanked from the clipboard in all cases.
> Sorry, but I cannot reproduce.
> Could you please provide detailed instructions about what you did?
>

[-- Attachment #2: Type: text/html, Size: 4247 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [BUG] org-paste-subtree level when point is in the middle of a heading (was: Make org-paste-subtree more predictable and useful)
  2023-01-19 17:31       ` Philipp Kiefer
@ 2023-01-20 10:12         ` Ihor Radchenko
  2024-04-19 11:13           ` Ihor Radchenko
  2023-01-20 10:21         ` [FR] Add C-u and C-u C-u prefix arguments to org-paste-subtree " Ihor Radchenko
  1 sibling, 1 reply; 13+ messages in thread
From: Ihor Radchenko @ 2023-01-20 10:12 UTC (permalink / raw)
  To: Philipp Kiefer; +Cc: emacs-orgmode

Philipp Kiefer <phil.kiefer@gmail.com> writes:

> 1. Org Mode-paste subtree low-level item swallowed: 
> https://imgur.com/a/CZ5lDaH . This relates to what I assume the passage 
> from the manual is trying to say should not happen:
>
> "makes sure that the subtree
> remains an independent subtree and does not swallow low level entries."

Confirmed. But what would be the expected behavior here? Inserting
before the heading at point? After?

Steps to reproduce:

1. Create a file

**** 1.1.1.1
**** 1.1.1.2
* 3
** 3.1
*** 3.1.<point>1
************ low-level item
*** 3.1.2
*** 3.1.3

2. Copy the first two headings
3. Move point as indicated
4. M-x org-paste-subtree

Observed: 1.* headings inserted after 3.1.1 and before "low-level-item",
thus breaking the sub-tree.

> 2. Org Mode-paste subtree on empty heading glitch: 
> https://imgur.com/a/AT5pDj6 . See my last message.

Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=c92769a50

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [FR] Add C-u and C-u C-u prefix arguments to org-paste-subtree (was: Make org-paste-subtree more predictable and useful)
  2023-01-19 17:31       ` Philipp Kiefer
  2023-01-20 10:12         ` [BUG] org-paste-subtree level when point is in the middle of a heading (was: Make org-paste-subtree more predictable and useful) Ihor Radchenko
@ 2023-01-20 10:21         ` Ihor Radchenko
  2023-01-20 19:27           ` Philipp Kiefer
  1 sibling, 1 reply; 13+ messages in thread
From: Ihor Radchenko @ 2023-01-20 10:21 UTC (permalink / raw)
  To: Philipp Kiefer; +Cc: emacs-orgmode

Philipp Kiefer <phil.kiefer@gmail.com> writes:

> Further, you suggest I use C-S-<right> to demote the subtree after 
> pasting it at the same level as the subtree at point. But what if I used 
> a numerical prefix argument to copy or cut several subtrees, maybe 5 or 
> 10? Not very convenient at all to demote them all by hand...
>
> I still hold that pasting headings / subtress either at the same level 
> or at the child level of the target heading is part of the bread and 
> butter of outline editing and should be as straightforward as possible. 
> I'm rather sure the current numeric prefixes of org-paste-subtree to 
> select a distinct level at which to paste are needed / used much less 
> frequently than a "paste at child level" prefix (maybe C-u C-u?) would 
> be if it was implemented.

Could you please provide concrete ideas what C-u/C-u C-u should do?
In particular, how it will interact with point located at heading,
at heading beginning, at empty heading, or inside a heading section.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [FR] Add C-u and C-u C-u prefix arguments to org-paste-subtree (was: Make org-paste-subtree more predictable and useful)
  2023-01-20 10:21         ` [FR] Add C-u and C-u C-u prefix arguments to org-paste-subtree " Ihor Radchenko
@ 2023-01-20 19:27           ` Philipp Kiefer
  2024-04-21 12:02             ` Ihor Radchenko
  0 siblings, 1 reply; 13+ messages in thread
From: Philipp Kiefer @ 2023-01-20 19:27 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode


On 20.01.2023 11:21, Ihor Radchenko wrote:
> Philipp Kiefer <phil.kiefer@gmail.com> writes:
>
>> Further, you suggest I use C-S-<right> to demote the subtree after
>> pasting it at the same level as the subtree at point. But what if I used
>> a numerical prefix argument to copy or cut several subtrees, maybe 5 or
>> 10? Not very convenient at all to demote them all by hand...
>>
>> I still hold that pasting headings / subtress either at the same level
>> or at the child level of the target heading is part of the bread and
>> butter of outline editing and should be as straightforward as possible.
>> I'm rather sure the current numeric prefixes of org-paste-subtree to
>> select a distinct level at which to paste are needed / used much less
>> frequently than a "paste at child level" prefix (maybe C-u C-u?) would
>> be if it was implemented.
> Could you please provide concrete ideas what C-u/C-u C-u should do?
> In particular, how it will interact with point located at heading,
> at heading beginning, at empty heading, or inside a heading section.
To be honest, I don't see much need for fine-grained special cases. I'd 
be very happy with C-u yanking at the level of the heading at point and 
C-u C-u yanking at one level below that, regardless of the exact 
position of point. I realize that would mean C-u doubling what can 
already be done by calling org-paste-subtree with point at the beginning 
of a heading but accessing both options (paste as sibling or child) with 
a single or repeat C-u seems more consistent to me than having one 
depend on position and getting at the other via the command prefix.

Thanks a lot for your dedication in working on this!


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [BUG] org-paste-subtree level when point is in the middle of a heading (was: Make org-paste-subtree more predictable and useful)
  2023-01-20 10:12         ` [BUG] org-paste-subtree level when point is in the middle of a heading (was: Make org-paste-subtree more predictable and useful) Ihor Radchenko
@ 2024-04-19 11:13           ` Ihor Radchenko
  0 siblings, 0 replies; 13+ messages in thread
From: Ihor Radchenko @ 2024-04-19 11:13 UTC (permalink / raw)
  To: Philipp Kiefer; +Cc: emacs-orgmode

Ihor Radchenko <yantar92@posteo.net> writes:

> Steps to reproduce:
>
> 1. Create a file
>
> **** 1.1.1.1
> **** 1.1.1.2
> * 3
> ** 3.1
> *** 3.1.<point>1
> ************ low-level item
> *** 3.1.2
> *** 3.1.3
>
> 2. Copy the first two headings
> 3. Move point as indicated
> 4. M-x org-paste-subtree
>
> Observed: 1.* headings inserted after 3.1.1 and before "low-level-item",
> thus breaking the sub-tree.

Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=d73688faa

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [FR] Add C-u and C-u C-u prefix arguments to org-paste-subtree (was: Make org-paste-subtree more predictable and useful)
  2023-01-20 19:27           ` Philipp Kiefer
@ 2024-04-21 12:02             ` Ihor Radchenko
  2024-04-22  0:35               ` Samuel Wales
  0 siblings, 1 reply; 13+ messages in thread
From: Ihor Radchenko @ 2024-04-21 12:02 UTC (permalink / raw)
  To: Philipp Kiefer; +Cc: emacs-orgmode

Philipp Kiefer <phil.kiefer@gmail.com> writes:

> To be honest, I don't see much need for fine-grained special cases. I'd 
> be very happy with C-u yanking at the level of the heading at point and 
> C-u C-u yanking at one level below that, regardless of the exact 
> position of point. I realize that would mean C-u doubling what can 
> already be done by calling org-paste-subtree with point at the beginning 
> of a heading but accessing both options (paste as sibling or child) with 
> a single or repeat C-u seems more consistent to me than having one 
> depend on position and getting at the other via the command prefix.

This feature is now implemented on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=5b0b7f292
Done.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [FR] Add C-u and C-u C-u prefix arguments to org-paste-subtree (was: Make org-paste-subtree more predictable and useful)
  2024-04-21 12:02             ` Ihor Radchenko
@ 2024-04-22  0:35               ` Samuel Wales
  2024-04-22  0:57                 ` Samuel Wales
  0 siblings, 1 reply; 13+ messages in thread
From: Samuel Wales @ 2024-04-22  0:35 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Philipp Kiefer, emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 2206 bytes --]

not sure i am fully following but it seems useful.

i thought i would report on a use case thtat might or might not be
relevant.  it seems so.

i often have

===
* heading 1
text of heading 1
* heading 2
text of heading 2
|
and more text
===

where | just shows where i want to yank.

and i want to make it look like this.

===
* heading 2
text of heading 2

heading 1 [/possibly/ with star removed]
text of heading 1

and more text
===

in other words i want to combine two entries into one by cutting the first
and pasting it someplace in the middle of the second.  [or, if the star is
not removed, then i want to basically truncate heading 2 with putting
heading 1 in the middle of the text of heading 2.]

what seems to occur with my settings is that heading 1 gets inserted as a
sibling below heading 2.  which doesn't help much if heading 2 has lots of
text.  so i'd like something that can allow me to at least yank at point.
others might not have this use case.  it is rather frequent for me.


On Sunday, April 21, 2024, Ihor Radchenko <yantar92@posteo.net> wrote:

> Philipp Kiefer <phil.kiefer@gmail.com> writes:
>
> > To be honest, I don't see much need for fine-grained special cases. I'd
> > be very happy with C-u yanking at the level of the heading at point and
> > C-u C-u yanking at one level below that, regardless of the exact
> > position of point. I realize that would mean C-u doubling what can
> > already be done by calling org-paste-subtree with point at the beginning
> > of a heading but accessing both options (paste as sibling or child) with
> > a single or repeat C-u seems more consistent to me than having one
> > depend on position and getting at the other via the command prefix.
>
> This feature is now implemented on main.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=5b0b7f292
> Done.
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>
>

-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com

[-- Attachment #2: Type: text/html, Size: 3398 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [FR] Add C-u and C-u C-u prefix arguments to org-paste-subtree (was: Make org-paste-subtree more predictable and useful)
  2024-04-22  0:35               ` Samuel Wales
@ 2024-04-22  0:57                 ` Samuel Wales
  2024-04-22 19:51                   ` Ihor Radchenko
  0 siblings, 1 reply; 13+ messages in thread
From: Samuel Wales @ 2024-04-22  0:57 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Philipp Kiefer, emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1342 bytes --]

to be clear, i am not suggesting violating outline mode's inability to
continue text after children, or violating levels.  let me redo.

i am ONLY saying i sometimes have the need to yank into the middle of the
text of an entry, even if what i am yanking is an entry.

it was probalby confusing that i provided 2 possibilities.  one was
removing stars, which leaves remaining questions about any descendants of
heading 1.  forget about that one.  the other was merely to yank heading 1
in the middle of heading 2's text.  both same level.

so here i go again with new decription: i am taking an entry and putting a
whole other entry into the middle of it at the same level like this:

===
* a new idea i had
regarding snicker snacks
* jabberwoky
some sophomoric comments on a poem

more sophomoric comments
===

becomes:

===
* jabberwoky
some sophomoric comments on a poem

* a new idea i had
regarding snicker snacks

more sophomoric comments
===

then i edit, probably turnign the new idea heading into a regular line.

if nobody else has this use case, then i would have to modify heading 1
before cutting and then paste it.  becauyse otherwise in my settings for
whatefer reason heading 1 ends up after heading 2.


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com

[-- Attachment #2: Type: text/html, Size: 1832 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [FR] Add C-u and C-u C-u prefix arguments to org-paste-subtree (was: Make org-paste-subtree more predictable and useful)
  2024-04-22  0:57                 ` Samuel Wales
@ 2024-04-22 19:51                   ` Ihor Radchenko
  0 siblings, 0 replies; 13+ messages in thread
From: Ihor Radchenko @ 2024-04-22 19:51 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Philipp Kiefer, emacs-orgmode@gnu.org

Samuel Wales <samologist@gmail.com> writes:

> so here i go again with new decription: i am taking an entry and putting a
> whole other entry into the middle of it at the same level like this:
>
> ===
> * a new idea i had
> regarding snicker snacks
> * jabberwoky
> some sophomoric comments on a poem
>
> more sophomoric comments
> ===
>
> becomes:
>
> ===
> * jabberwoky
> some sophomoric comments on a poem
>
> * a new idea i had
> regarding snicker snacks
>
> more sophomoric comments
> ===

Just call org-yank with prefix argument (C-u C-y):

    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.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-04-22 19:50 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-17 20:14 Make org-paste-subtree more predictable and useful Philipp Kiefer
2023-01-18  8:04 ` Ihor Radchenko
2023-01-18 15:41   ` Philipp Kiefer
2023-01-19  9:44     ` Ihor Radchenko
2023-01-19 17:31       ` Philipp Kiefer
2023-01-20 10:12         ` [BUG] org-paste-subtree level when point is in the middle of a heading (was: Make org-paste-subtree more predictable and useful) Ihor Radchenko
2024-04-19 11:13           ` Ihor Radchenko
2023-01-20 10:21         ` [FR] Add C-u and C-u C-u prefix arguments to org-paste-subtree " Ihor Radchenko
2023-01-20 19:27           ` Philipp Kiefer
2024-04-21 12:02             ` Ihor Radchenko
2024-04-22  0:35               ` Samuel Wales
2024-04-22  0:57                 ` Samuel Wales
2024-04-22 19:51                   ` Ihor Radchenko

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.