Am 22.01.2016 um 12:04 schrieb Chris Yate: > On 22 January 2016 at 10:44, Urs Liska <u...@openlilylib.org > <mailto:u...@openlilylib.org>> wrote: > > If I have > > % file a.ly <http://a.ly> > \include "b.ily" > > % file b.ily > \include "c.ily" > > % file c.ily > > can I somehow refer to file b.ily from file c.ily? > In other words: If b.ily includes c.ily can I know from within c.ily > that it was b.ily who included me? > > I suppose not, but one should never give up without asking ... > > Best > Urs > > > Hi Urs, > > What are you trying to achieve? If you \include "c" at the end of "b", > I imagine the code in "c" will have access to code from "b". > > But this smells like a circular dependency that you need to break with > a common include file.
Well, I should probably be more explicit with my question. What I'm thinking about is the following: I have the file openlilylib.ily, which is the main entry point to openLilyLib. I'm currently changing the way how openLilyLib is organized. Previously you loaded openLilyLib, and then you had the command \useLibrary to load specific libraries from within openLilyLib. In the future the libraries will be in separate repositories each (disentangling code, distribution, collaboration and whatever). For example you'll have the directories openlilylib/scholarly openlilylib/oll-core You'll "load" the ScholarLY library by including its main file (e.g.) openlilylib/scholarly/main.ily, and this will in turn include openlilylib/oll-core/main.ily. So as a user you won't write \include "openlilylib" \useLibrary Scholarly anymore but \include "scholarly/main.ily" (or something similar) Now the question comes: openLilyLib registers a list of loaded libraries and its options. What I'm thinking about is if a function inside openlilylib/oll-core/main.ily can determine from which file it has been included and then add this to the list of loaded libraries. If that's not possible that wouldn't be much of an issue. ScholarLY would then simply have to include oll-core and *then* issue a command to register itself with oll. But I just wanted to explore the possibility. Urs > > Chris
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user