Warning: Please consider paste-retaining-clones unreliable until further notice. Leo's new structure tests have shown that paste-retaining-clones has always been buggy!
This Engineering Notebook discusses the bug and my plans for fixing it.
Problems with paste-retaining-clones
The paste-retaining-clones logic calls fc.linkChildrenToParents as a last-minute hack. Alas, the versions in both the master and devel branches are buggy. No quick fix seems possible.
Félix points out that paste-retaining-clones has never replaced existing body text with pasted body text. In other words, the command has never enforced the "pasted nodes rule" policy. Félix and I have discussed various strategies without a clear conclusion.
Remediation Plan
Step 1: Warn Leonistas about long-standing problems with paste-retaining clones.
That's what this ENB does :-)
Step 2: Enable automatic link repair in c.checkVnodeLinks and merge the changes into devel.
This item is urgent. I'll create a new PR for this item and merge it into devel and PR #3467 asap. At that point, devel will be approximately as reliable as it has ever been :-)
Step 3: Continue work on PR #3467: fix paste-retaining clones
Automatic link correction might render fc.linkChildrenToParents unnecessary. But lots of testing would have to back up such a conclusion!
In any case, enforcing the "pasted nodes rule" policy will not be easy!
I might rewrite paste-retaining-clones, perhaps basing it on the new p.archive method. Small hacks are unlikely to work.
Summary
Leo's paste-retaining-clones command has never worked as intended! Use at your own risk!
A new (small!) PR will soon add automatic link correction to all branches. This PR will feature a stringent new unit test for the link correction in c.checkVnodeLinks.
PR #3467 will attempt a complete fix for paste-retaining-clones. This work is experimental and is likely to delay Leo 6.7.4.
Edward
Great news. The "Emergency" PR (PR #3468) should make paste-retaining-clones work as intended!
The PR fixes paste-retaining-clones by replacing the hopeless fc.linkChildrenToParents with c.checkOutline!
The PR probably does not enforce the "pasted nodes rule" policy, but that's a nit.
To do: complete the unit test for the error recovery code. I'll merge the PR as soon as this task is complete.
Edward