We *must* have the data in sentinels for robust sharing of outline 
structure.  Here's another way to get that data:

1. We need only a single Leo-centric line for each external file.  This 
would be very similar to a vim-outline line.  The line would have the form::

    #leo-data <sha1-key>

This line gives the sha1 value for all the *other* lines of the file (not 
including the #leo-data line itself).

The obvious place for the #leo-data line is either the first or last line 
of the file, but it could occur anywhere.

2. The sha1 key is the way to get the value of the file *with* Leo 
sentinels:

- When writing an external file, Leo must write the corresponding file to a 
**central Leo server**.  A dedicated project on GitHub is the obvious place 
to store all the files (blobs).

- When reading a non-cached external file, Leo will:

a) get the leo-data line from external file.

b) get the corresponding file (with sentinels) from the central Leo server

c) use the file (with sentinels) to recreate outline structure.

This is kinda like @shadow, but more like @file because no diffing is 
required.

I think it's slick.  It will work as long as Nancy et. al. will tolerate a 
single extra line.  

Notes:

1. Given how much timestamping, etc. appears at the start of most source 
files, one extra line should not be too upsetting.  Note that the sha-1 key 
in effects represents the entire @file node, including directives, 
settings, etc.

2. This scheme imposes costs only on Leo users, never on non-Leo users.  It 
does not change sccs work flow at all.  It could be used with any sccs, but 
is a natural for git.

3. Unlike @shadow or @auto, this should be quite easy to implement.  It 
requires no language-dependent code.

Your comments, please.

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