> I feel like this is the whole point of clones, but I'm unclear about the 
> rules for clones outside of / reaching into derived files.  I don't want to 
> have to worry about whether files are @thin or @auto or @shadow... I guess 
> they can't be @auto, but @shadow would be fine.
>
> So is this safe?  Are their issues of order or anything to watch?  Maybe the 
> gotchas I'm trying to avoid only arise when you have a clone occurring in two 
> derived files, as opposed to the derived file and the .leo file as I intend.

>From my experience I would say it is safe given the following
conditions (and I do remember I promised a full clone perspective post
- maybe this weekend):

1. Your derived files should be @thin or @shadow. The reason is
because for clones to work Leo needs to know the gnx of the node.
@thin and @shadow keep this info in their sentinels, as well as Leo
itself for you cloned for convenience nodes.

2. You cloned for convenience nodes should appear before the derived
files in Leo tree. The reason is because if Leo finds different
content for clone nodes, the content of the last node wins (this is
something I do not like, but this is life for now). It means that if
your files were externally edited and then re-read to Leo, you want
the new content of the clone node to win, not the old content that Leo
remembers.

There is a slight border case here if you do not save the tree after
such update - it may not update the next time. So, if clone nodes
become dirty when you open Leo, save it immediately.

3. If you have the same clone in multiple files, best not to change
these files outside of Leo (due to the explanation in 2 - the order
becomes significant).

Enjoy :)

Gil
-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.


Reply via email to