Flaming Hakama by Elaine <[email protected]> writes: > This is a bit confusing since it seems that > you are saying 2 things: > > 1) If books have a scope of their own, [scopes of explicit books would > be] > separate from the scope in the implicit book. > > This makes sense, since we'd expect the scopes of books, > which are siblings, to be distinct. > > But, I don't think that the issue was to use definitions > from one book in another book. The issue was: > how do I define variables within a book, to be used > within that same book. > > > However, I don't understand: > > 2) If books have a scope of their own, > no "global" definitions would be visible in > explicit books > > > I'd rather expect that any book scope > would be within the global scope, > so anything defined globally > would be available within each book.
"global scope" belongs to a book of its own. >> Unfortunately, there does not appear to be a concept readily >> consistent with scoping the current book/bookpart design. Because >> "scope" does not mean "you are defining the variable where you want >> to use it". A consequence of well-defined scopes is that you can >> more often do it in that manner without impacting other code. But I >> haven't seen a good "well-definition" with LilyPond. I am pretty >> sure that people would protest books not getting to see definitions >> made "outside" of them. So normal books would have to be nested in >> the implicit default book like bookparts of the implicit book are. >> > > This seems backwards from the discussion earlier, > where the advice was to import your files with variables > into the global space, not within the bookpart. Well, it's nice to lead discussions utterly ignoring what LilyPond actually does. But they are not likely to lead to a tenable path forward. -- David Kastrup _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
