On 5/27/20, Edward K. Ream <[email protected]> wrote: > On Wed, May 27, 2020 at 12:56 AM John Clark <[email protected]> >> For brevity, I denote clones that are internal to the source tree only as >> "local clones". In the templating use case, I think there's a strong case >> to be made for NOT linking local clones under the source node in the the >> copied tree. Doing so allows provisioning of clones internally in the >> source "template" that define content that is shared around the children >> of the template, but is likely to be different in deployments (copies) of >> that template. >> >> I hope that makes sense. >> > > Yes, that makes sense to me. It's a bit different from either of the two > options I gave, but that shouldn't matter. It should be doable. > > Note: depending on where (and how!) you copy node Y, the external clone of > X3 might not turn out to be a clone. This will happen if you don't copy Y > to the original outline, but rather to an outline that doesn't contain a > node X3 with the same gnx as the copied node X3.
Ah! That would be cool: internal/local clones become a new vnode in the new template. This is for John's use case, but I would suggest two kinds of paste-as-template -- a) template-with-encapsulated-clones, where the new template tree makes new vnodes to represent any internal clones it finds, rendering the template "independent" or encapsulated b) and template-with-global-clones, a simpler case where plain nodes become new copies and for all clones you just make another pointer to the same vnode as in the original tree being templated. I guess the detection of internal/local clones could be defined in different ways. It could be any clones that happen more than once in the tree become internal/local and generate a new vnode. But then the question of what happens to clones that occur once in the tree remains -- do they remain "global", links to the vnode in the original tree, or do they become plain, new copied nodes? Becoming new copied nodes instead of new "global" clones seems to make sense from the standpoint of the notion of creating "encapsulated" templates. Seems to me people could work with that type of pair of template operations, handling the decision of where they want global clones by manually pasting as clone or templating-with-global-clones wherever they want to put in global clones. They'd see lone external clones "disconnect" as they template-with-encapsulated-clones and recognize what's happening and then they'd just take responsibility for those by coming back in and pasting just those clones as global, even within templates they've already pasted-as-encapsulated. BTW, they're all "global" clones in the end, just some new ones get created if you choose to paste-as-encapsulated. The idea of local clones only pertains to the moment of creating the template. The alternative would seem to me to involve creating a new kind of "local" clone, specially designated as such, which seems unnecessary. Seth > > 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/CAMF8tS3NRF3brXppvDBNYsx4PvF1n3OHsByKOKhUOJ72XEPvLQ%40mail.gmail.com. > -- 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/CAJkfFBx8EVhjBdOTuPd1PWBt-P%2B9prk0wMjJOKG%2BZTPjJa1g%3DA%40mail.gmail.com.
