#3429 suggests that Leo's paste-node command should retain gnxs if doing so would create no gnx clashes in the pasted node.
Thomas, Félix and I have been debating what anyGnxClashes should check. Should it check the entire pasted tree or only its root? Depending on the answer, the paste-node will act like Leo's legacy paste-node or paste-node-retaining-clones commands.
Aha! The contents of the target outline don't matter! What matters is the user's intention.
Thomas uses cut-node/pastes-node mostly to move outlines. For him, paste-node-retaining-clones is likely the best binding for ctrl-shift-v.
But I typically use copy-node/paste-node to cherry-pick outlines from other branches. For me, paste-node is the best binding.
Summary
When using paste-node, the user won't know what anyGnxClashes will return. That can't be good!
Aha: it shouldn't matter what nodes are in the target outline. What matters is whether the user wants to regain gnxs!
Users who regularly use copy-node/paste to move nodes may find it best to bind ctrl-shift-v to paste-nodes-retaining-clones. Perhaps the binding for ctrl-shift-v should change in leoSettings.leo.
The work on this project has not been in vain. We all now understand more deeply how Leo's paste-node commands affect gnxs.
Please comment. I'll leave #3429 open while we continue our discussion.
Edward
I currently only see command paste-retaining-clones. Is this the command you are referring to (not paste-node-retaining-clones)?
I can now see that the concept of operation is simple. Within an outline, for a parent-and-subtree:
I got some more clarity about this, and I commented the following on the proposed PR:
I can now see that the concept of operation is simple. Within an outline, for a parent-and-subtree:
I think that Leo's defaults should act this way.
- Ask for a move, get a move; gnxs do not change;
- Cut-paste is the same as a move;
- Ask for a copy, get a copy, meaning all nodes get new gnxs.
- To paste a copy when the top of the copied tree already exists means by definition to ask for a copy.
No, I haven't tried it. I'm not even sure I would want to.
Think about how the Windows file explorer works. If you copy a file and paste it, it gives the pasted file a name that includes "copy" if there is another file with that name in the same directory.
It's an interesting analogy but misleading. A Leo node is more like a directory than a file. Subnodes matter in this discussion.
The question is whether pastes should retain all gnxs or none of them.
Yes, Leo could copy a tree depending on whether clashes exist. But it's our intention that matters, not gnx clashes. That was the Aha.
Leo's paste-node and paste-retaining-clones commands support either intention. That should be enough.
Summary
It's easy to reject the proposal. It's unlikely to work as expected. Leo's existing commands suffice.
Edward