On Tue, Feb 3, 2015 at 3:41 PM, Edward K. Ream <[email protected]> wrote:

Assigning code to one node or the other (or to both nodes!) is a judgment
> call.  It would take language-specific AI to do a reasonable job. That's
> not going to happen.  Instead, the user should choose a **dividing line**
> in incoming text.  Text above the line would go to the preceding node; text
> below the line would go to the following node.
>

​On second thought, I am going to abandon the gui-based approach for now.​


​New code could be assigned to three or more nodes: this can happen when
there are empty nodes in the outline.  Given N additional lines of text, it
would be possible to assign the lines to N new nodes.  In other words,
there could be N-1 dividing lines!

Rather than mess around with such complications at the gui level, there is
another, much simpler way.  In cases where new code could plausibly be
assigned to two nodes, Leo will simply create a new node.
The user can then split this node as desired.

So the plan is to represent all changes to the outlines by creating a
summary outline containing clones of all inserted, deleted and changed
nodes, much as Leo presently does in other situations.

This simple interface will allow me to concentrate on the task of actually
updating nodes.   The code will use difflib.SequenceMatcher to discover the
required changes, but actually apportioning the changes to outline nodes is
complicated.  In fact, it is similar to the code for the goto-global-line
command.

I have begun work on this project and I have confidence that it can be
completed relatively cleanly, without nearly as much infrastructure as
@shadow.

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

Reply via email to