On Sat, Dec 7, 2013 at 8:18 PM, SegundoBob <[email protected]> wrote:

>
> But what does "last clone wins" mean?
>
> My first guess was that the header and body of the node are taken from the
> last occurrence in tree order of the cloned node and the prior occurrences
> are ignored.
>

Sorry.  I wasn't at all clear.

 "last clone wins" means "last clone Leo *reads* wins".

The question is, does Leo read external files (@file) first, or the .leo
file first?  The answer, as I have just verified by looking at getLeoFile
in leoFileCommands.py is that Leo reads the .leo file first, and then the
@file nodes.

So if 2 clones appear in the .leo file, but not in any external file (@file
node), then the two clones are always the same.  Indeed, there is no way to
change those files in an external editor (except by changing the .leo file,
and you had better not do that!)

Otoh, if a clone appears in the outline *and* in one or more @file nodes,
the last clone in the last @file node (in outline order) wins.

I *think* this is correct, but I wouldn't bet my life on it.  There is one
more complicating factor, namely caching.  I suspect caching doesn't change
anything, because loading an @file node from the cache should be exactly
equivalent to loading the @file node from the external file.  If it isn't,
it's a bad bug.

HTH.

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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to