On Wed, May 27, 2020 at 2:08 AM vitalije <[email protected]> wrote:
Personally I have felt (more than once) a need for this kind of command in > the past. It is hard to make a simple rule that this command should follow > to decide which nodes to clone and which nodes to copy. Whatever rule we > decide on, it will lead to ambiguous situations when tree changes between > copy and paste command. > I agree. I hadn't thought about this case. Perhaps this can be simplified to this command: > `paste-retaining-marked-nodes`. User can mark nodes that are to be > retaining identity after paste. All other nodes should have new identities > after paste. I guess this would be trivial to implement and user would have > full power over the effect of the command. > An excellent idea. At present, I am leaning towards adding a new copy command, rather than a new paste command. The user would do, say, copy-retaining-marked-clones, followed by the usual paste-retaining clones. It's a lot easier to customize writing than to customize reading. copy-retaining-marked-clones would create new, unique gnx's for all nodes except marked clones. This makes the cloned property in the *original* (template) tree determinative, which seems reasonable. Creating another version of paste-retaining-nodes would be difficult. Leo's copy-node command retains all gnx's. The paste-node eventually ignores those gnx's. The paste-retaining-clones does not. It's an either-or thing, driven by the gnxDict. An experiment that added only some gnx's to that dict failed. Separate vnodes got the same gnx. Fortunately, Leo caught that problem. Trying to tell the FastRead class to follow a mixed strategy would likely be difficult and error prone. Or so I think now. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/CAMF8tS2km%2BfhuCy%2Bcicmt-7BJLfSTuqa%3Dzg-ivDub%3DEpsUESyA%40mail.gmail.com.
