On Mon, Jun 14, 2010 at 11:26 PM, thyrsus <sschae...@acm.org> wrote: > Concerning "Multiple parts not allowed": > > Having contemplated the code carefully, I now think I can summarize in > English what is happening, speculate about what was supposed to > happen, and propose what, to me, is a less surprising behavior.
I'll take your word for it :-) > What I believe the code intended: I have no opinion, 10+ years later, about what was intended, except that I *probably* wanted to follow the conventions in Knuth's CWEB system: http://www-cs-faculty.stanford.edu/~uno/cweb.html Somewhat surprisingly, I still have the original manual, from 1990, so let's see what it says. Well, that won't really work, because then context is different. I think it safe to say that I modified Knuth's conventions to suit the outline environment. That being so, the conclusion is that we are free to pick any convention that seems reasonable, provided that people don't start howling that we've broken their code. OTOH, it may be that only two are three people have used @root in the last 10+ years, so there is a good chance that we have a totally free hand. > The behavior I would find less surprising: > << section foo >> headline + @c body add parts to the definition > of section foo in the same way that body << section foo >>= adds > to the body of section foo. An excellent suggestion. The "error checking" doesn't seem helpful. But supporting both "spellings" is good: it would allow a script to create noweb or cweb sources without having any "smarts". That is, the (Leo) user would be able to choose whether to use "=" or "+=" if it makes a difference to either noweb or cweb. I just checked Chapter 4, and there no mention at all of "+=". Thus, I think we can conclude that "+=" is an undocumented feature, and we are free to treat it as we like. Does anyone who actually uses @root have any objection to this? > Am I missing something? Not that I know of. > Is there historical justification in CWEB or noweb for the current behavior? CWEB did treat "+=" differently from "=", but we can ignore that. To repeat, we probably do want to support both spellings, just in case somebody wants to make real CWEB sources from a Leo outline. The possibility is remote, but I see no particular reason not to allow the two spellings. Thanks for this good work. I suspect that treating "=" and "+=" the same will simplify the code considerably. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-edi...@googlegroups.com. To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.