[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
- RE: try except in lilypond, (continued)
- RE: try except in lilypond, Mike Solomon, 2016/11/19
- Re: try except in lilypond, Andrew Bernard, 2016/11/19
- Re: try except in lilypond, David Kastrup, 2016/11/19
- RE: try except in lilypond, Andrew Bernard, 2016/11/19
- Re: try except in lilypond, Noeck, 2016/11/19
- Re: try except in lilypond, Urs Liska, 2016/11/19
- Re: try except in lilypond, Noeck, 2016/11/20
- Re: try except in lilypond, Timothy Lanfear, 2016/11/20
- Re: try except in lilypond, Noeck, 2016/11/20
- Re: try except in lilypond, Timothy Lanfear, 2016/11/20
- Re: try except in lilypond,
Noeck <=
- Re: try except in lilypond, Urs Liska, 2016/11/20