lilypond-user
[Top][All Lists]
Advanced

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

Re: try except in lilypond


From: Noeck
Subject: Re: try except in lilypond
Date: Sun, 20 Nov 2016 18:32:05 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

Hi Timothy,

thanks again! That's my solution now:

includeoptional = #(define-scheme-function (fname) (string?)
  (if (ly:find-file fname)
      (ly:parser-include-string (format "\\include \"~a\"" fname))
      (display (format "File ~a could not be included" fname))))


>From a quick test, this does what I want:
- Include a stylesheet if it is available and silently ignore it if not
  (a warning is shown without alerting lilypond)
- For my case it's enough, if a user bothers to take my stylesheet and
  set it up to use it, he can also put the fonts in place.

So my original question is answered sufficiently (without error handling).


Would such an optional include function be of interest for lilypond?

Cheers,
Joram




reply via email to

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