Marc Hohl <m...@hohlart.de> writes: > Hello list, > > I think this has been answered before, but I don't find it in the > archives... > > Assume I have the following file scoretest.ly: > > \version "2.17.10" > > #(define opt-score (or (ly:get-option 'score) "Full")) > > musicA = \relative f { > c''4 d e f | g1 > } > > musicB = \relative f { > c'4 b a f | g 2 g > } > > testScoreA = \score { > \new Staff { \musicA } > } > > testScoreB = \score { > \new Staff { \musicB } > } > > testScoreFull = \score { > << > \new Staff { \musicA } > \new Staff { \musicB } > >> > } > > \score { > #(string-append "testScore" opt-score) > } > > I want to call this file either by lilypond without options, > which should yield in calling \testScoreFull in the \score { ... }, > or by 'lilypond -dscore="A" testscore.ly' to obtain \score { \testScoreA }, > 'lilypond -dscore="B" testscore.ly' should produce \score { \testScoreB }. > > The test file does not work, and I am sure that I have seen > something very similar somemonths ago, but I don't find it right now. > > Any hints are highly welcome!
#(string-append ...) is a string. Maybe you want something like $(module-ref (current-module) (string->symbol ...)) or $(ly:parser-lookup parser (string->symbol ...)) Not particularly fond of this kind of interface, though. -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user