* 2012-10-22 06:41 +0200 Reedmace Star: > * 2012-10-22 04:44 +0200 Ian Hulin: > > > If my-scheme-defs.scm is in path my-scheme-dir > > > > --- file master.ly --- > > > > \version "2.16.0" > > % allow guile to find your file. > > #(set! %load-path cons("my-scheme-dir" %load-path)) > > #(load-from-path "my-scheme-defs.scm") > > > > %% do something ... > > O.k., but that would require "my-scheme-dir" to be an absolute path, > lest I run into the original problem, right? > > To keep the project self-contained and movable, I would prefer to > include relative to master.ly. Can I somehow find out its containing > directory from inside that file?
To half-answer my own question: guile 2 seems to have a function (current-filename), so something like (dirname (current-filename)) instead of "my-scheme-dir" might work. Though LilyPond is still using guile 1.8, this at least puts a possible future solution on the horizon. In case someone knows a method that works now, I'm still interested. Best regards, R.S. _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user