Leo now supports two new: view-pack and view-unpack. Each command is fully undoable.
view-pack does the following: - Creates an @views node if necessary. - Prepends @view to the headline of the selected node if necessary. - Deletes all cloned children of the selected node, replacing them with lines in the body text of the form:: unl: <absolute unl of a representative node for the clone> - If necessary, makes a clone of the selected node and moves it to the last child of the @views node. Th view-pack command is safe: it deletes a clone only if there exists another clones that will not be deleted. The view-unpack command does the reverse, but leaves the @views and @view nodes unchanged: - Creates clones for all leading unl: lines in the body text selected node. - Deletes all leading unl lines. Undo and redo for these commands are "complete": they fully reverse all changes made to the selected node *and* the @views tree. Edward P.S. These commands fully demonstrate all the infrastructure to support @auto-view nodes. This infrastructure consists of 20 or so helper methods in leoViews.py. Each helper is short and simple. Most have already past unit tests. This guarantees that @auto-view will be build on a solid foundation. All aspects of the @auto-view write logic are complete. The clone-linking part of the read logic is complete. Still to do: - Call the appropriate methods in leoViews.py when reading and writing @auto files. - Recreate organizer nodes when reading @auto files. Both these steps are easy, and will happen soon. 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 [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.
