On Saturday, February 8, 2014 12:29:26 PM UTC-6, Edward K. Ream wrote:

> In short, replacing @file with @auto isn't quite dead yet.

An Aha: we can get most of the effects of section references simply by 
creating corresponding *organizer* nodes.  This possibility never occurred 
to me in the almost 20 years I have been thinking about literate 
programming and outlines.

The correspondence isn't exact.  Without section references there is no way 
to *force* code to have a certain order, but a workaround is possible.  
Just start headlines of children with 1., 2., etc.::

  + Classes (an organizer)
    + 1. Base classes
    + 2. Subclasses

This alphabetizes the headlines of siblings, so that the sort-siblings 
commands will not reorder them.  It is also a clear statement of intent.  I 
have actually done this already in some cases.  See the children of 
vr.precompute_all_data.

This might be good enough for me personally.  I'll continue to grind away 
on this project with the ultimate aim of converting Leo files to @auto.  
Imo, this must happen if the new code is ever to be adequately tested.

Edward

P.S.  In the previous post I mentioned the possibility of converting a 
single node A::

    anIvar= False
    def spam(self):
        '''A method using anIvar.'''
    foo = spam

to a list of nodes::

+ spam, etc.
  - anIvar = False
  - spam
  - foo = spam

As a thought experiment, it might be possible to define **merging organizer 
nodes**  That would reconstitute the original single node from a list of 
children of an organizer node.  In other words, reconstituting node A from 
the organizer node called "spam, etc."

At present, I think such merges are a bridge too far: they are likely to be 
too fragile.  But if they could be done reliably it would be very cool.  It 
would complete the magic.

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.

Reply via email to