lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: try except in lilypond


From: Timothy Lanfear
Subject: Re: try except in lilypond
Date: Sun, 20 Nov 2016 16:09:54 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

On 20/11/16 15:44, Noeck wrote:
Hi

I tried this now as a top level scheme construct,

#(if (file-exists? "somepath.ily") (#{
          \include "somepath.ily"
 #}))

But lilypond does not like it. Do I need a scheme function (even without
arguments)? Is including inside scheme possible?

I fear that any solution is probably more complex than just writing:

% For a stand alone version remove these lines ...
...
% ... until here.

and leave it to the user to care about it.

Thanks also for the suggestion of processing scripts around, but that's
not the question. I have them. I just wanted the score to be compilable
without.

Cheers,
Joram



How about something like this?


(if (access? "somepath.ily" R_OK)
   (ly:parser-include-string "\\include \"somepath.ily\""))

Tim Lanfear








reply via email to

[Prev in Thread] Current Thread [Next in Thread]