On Wed, 18 Jan 2012 15:14:52 -0500
Seth Johnson <[email protected]> wrote:

> Is it correct to say that you'll have no problems if you use the Leo
> app and just freely and unthinkingly use clones in one Leo file?  No
> cross-file clones?

Can you restate the question?  All clones live within a single Leo
file, cross-file clones occur between derived @<file>s within a single
Leo file.

> The generating content thing is in tension with the fact Leo is a tool
> for working with external files for a particular kind of purpose:
> editing code, which is linear and of a nature where things have their
> (one) place.  You're doing something wrong if you're creating external
> code files that are designed to have many places update with the same
> actual textual code, which you are aiming at changing in one location
> and having multiple places in the external files update textually and
> redundantly from that.  Code isn't like that: you call a function that
> resides in its one right place, and update that single instance of
> that function, not replicate the text of that function all over.

Leo's not intended to be limited to editing code.  Personally I'm happy
using whatever code-domain specific solution is appropriate for
handling repetition, `import` in python, `.. include:` in rst, some
templating language for XML or text generation.  But it seems like
people keep getting in to trouble trying to use clones to do that sort
of thing.  Maybe the problem's not that big, the use-case is not that
common, but unfortunately it leads to "Leo ate my data" threads.

On top of which, given the way template systems like jinja and Genshi
work, I think they'd integrate into Leo in quite powerful ways.  I've
actually used Genshi like that for making a website where a Leo node is
the template and its children are data for items which need to be
rendered in the template.

Maybe there's no way to stop people shooting themselves in the foot
with a tool as complex and versatile as Leo - I just think that with
clones they sometimes don't know the gun's loaded until it's too late.

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to