On Fri, 13 Jan 2012 14:27:36 -0800 Matt Wilkie <[email protected]> wrote:
> I thought one of the major reasons for clones was to be able to > "boiler plate" common content across many files. Examples might > include copyright notices, written by _____, code functions that get > re-used a lot and so on. > > Is this an incorrect, or at least inadvisable, use of clones? I think it's a use of clones that forces you to deal with rules about what's safe and what's not safe which are easy to forget or get wrong. This is the same point Edward hit on recently: http://groups.google.com/group/leo-editor/msg/12b9531a9b3025bb Most programming languages have import / include mechanisms for referencing common code. Ditto document generation systems like LaTeX, DocBook, and rst. There are numerous templating systems for handling repetition in HTML and similar outputs. Those are safe, DRY compliant ways of addressing these needs. *But* they all require specific knowledge - by appearing to offer a generic solution to these needs which works for multiple output types (code, HTML, rst, etc.) Leo's clones are very appealing. However I don't think (Edward?) that was what they were designed / intended for. Rather, they're intended to provide views / collections / bookmarks of currently interesting parts of files. Personally I think UNLs are a safer way of doing that, but clones do it very nicely, as long as you don't break the rules. That's where I think these issues about what clones do is coming from. Perhaps Leo could offer some kind of generic solution by providing some sort of templating system which could be applied to any text file output. But it would still require a distinction between source files and output, or built, files. Kind of cross-file section references. 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.
