On 02/03/2015 03:59 AM, Edward K. Ream wrote:
>     I have a program that compares Leo-Editor files.  This will allow me
>     to merge changes when I make changes to the same file using Android
>     Outliner and Leo-Editor--as soon as the bug described in Issue #130
>     is fixed.
> 
> 
> ​Could you share this program as well?  It could be extremely important,
> as I shall now explain.​
>  
> 
> ​ There is another use for a program that compares Leo files.  If
> suitably easy to use (integrated into Leo), it could be the foundation
> for using @nosent files instead of @shadow files.
> 
> The idea is to run the outline-compare program (script) when the tree in
> an an @nosent tree does not exactly match the corresponding external
> file.  This would be kinda like what @shadow's read algorithm does, but
> with the following subtle, but important differences:
> 
> 1. No duplicate hidden file is written when writing the @nosent node.
> 2. [Maybe] The user is always made aware of the differences.
> 3. The user is in complete charge of how to resolve ambiguous updates:
> changes that fall at the end of one node or the beginning of the next.
> 4. [Maybe] The diff algorithm (in your script) ​will be simpler than the
> diff algorithm in the @shadow code.
> 
> Using @nosent should be more intuitive, simpler and faster than
> @shadow.  This is something I definitely want to explore.
> 
> Crucially, this scheme preserves both node identities (gnx's) and clone
> links because both are stored in @nosent trees in the .leo file.
> 
> **Important**: Leo already has several flavors of outline-comparisons,
> but none of them are simple enough to be the basis of an automatic
> update of @nosent files.   We want something as easy to use and
> understand as the best external diff/merge programs, such as the diff
> used in git clients such as SourceTree.
> 

My program is named diff_leo.py.  I am almost certain that it is of no
interest to you.  It does not address any of the problems you address
above.  It does not have any of the functionality you desire.  The ideas
it embodies are not applicable to your problems.

diff_leo addresses the problem:  Given two files containing outline
information how do you use the outline information to improve finding
and presenting the differences between the two files.

You are interested in comparing one file containing outline information
(and all headline and body content) with a flat file containing no
outline information, but only node body contents.  This is a new problem
to me.  I have nothing to contribute to its solution.

diff_leo is a command line program.  It contains no GUI code.  It uses
Leo-Editor and meld or xxdiff to present the differences to the user.

diff_leo has nothing to contribute to speeding up diffing.  I hoped it
would, but in the end I gave that up.  It's worst case is impractically
slow.  But I think that for almost all practical cases it is fast enough
to be useful.

I intend to put diff_leo on the Python Package Index and github at the
same time.  I've worked on the packaging problems quite a bit, but I'm
far from finished and I may never finish.

-- 
Segundo Bob
[email protected]

-- 
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/d/optout.

Reply via email to