This should be documented somewhere.  This post will be prewriting for such 
docs.

Recently I realized that Leo must insert sentinels into external files even 
if the user never uses clones.  Indeed, sentinels create **identity**, the 
notion that a particular nodes starts at *this* place in the external file 
and extends to *this other* place.  Identity is a persistent, invariant 
attribute of a file: Leo recreates all the nodes of the external files when 
re-reading the file.

It's really that simple, but let me discuss some consequences:

1.  Identity remains even when the contents of a node changes.  Thus, there 
is *no way* to use content-related mechanisms to recreate identity.  This 
means, for example, that git can never help recover identity.

2. Leo's sentinels mark an *arbitrary* range of text within the external 
file.  Thus, @auto files can never be as flexible as @file nodes.

To repeat: sentinels are necessary for clones, but sentinels would still be 
necessary if clones did not exist.

Edward

P.S. The hugely complicated (and now abandoned) "new @auto" import code 
attempted to create a pseudo identity based on the imported outline 
structure.  It was not as flexible as @file nodes because the structure had 
to correspond to class/method/function structure.  Furthermore, the pseudo 
identity was fragile because renaming classes, functions or methods could 
break the correspondence between former nodes and newly-changed incoming 
nodes.

EKR

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to