On Fri, Jan 29, 2010 at 11:07 AM, Gil Shwartz <[email protected]> wrote:

> I think that any case where Leo reads an external file and does not
> reliably represents its content should be eliminated.

I agree completely. This is an excellent characterization of the
problem: an external file supposedly represents its own content
completely, but *doesn't* because it loses a clone battle.

It seems to me that we are both saying the same thing.  This case
should be avoided.

At present, I recommend avoiding it as follows.

1. Recent changes to Leo ensure that external files containing @all
always lose clone battles.  This makes sense, imo, because such files
aren't used to create "real" source files.

2. I strongly discourage the case where two (or more) external files
*not* containing @all share the same clone.  In that case, one clone
will win, and all other external files will lose.  Not a good
situation.

BTW, Leo reads external files after reading their .leo file, so the
.leo file will always lose to an external file.  Again, this seems
quite reasonable to me.  We expect users to update external files from
time to time, but never (or hardly ever) to update .leo files in an
external editor.

> 2. Using @all, which is something a bit new, described above. Is that
> good? It is a difficult logic (if I captured it right) - Leo reads the
> external @file, but runs down any clone within it, which Leo already
> knows about.

I think it is the simplest thing that could possibly work.  The logic
is simple: just at the point at which a node might win a clone battle,
we disable the update if we are in an external file containing @all.

The reason this is the simplest approach is that it is limited to one
or two well-defined places in Leo's read logic.  It has *no* effect
outside of that read logic.

Edward

-- 
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