lilypond-user
[Top][All Lists]
Advanced

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

Writing LilyPond files conditional on LilyPond version (Wikimedia Score


From: David Rydh
Subject: Writing LilyPond files conditional on LilyPond version (Wikimedia Score extension)
Date: Sun, 9 Feb 2014 22:15:55 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Hi,

I'm experimenting with MediaWiki's Score extension. The current
version of the Score extension, 0.2, runs lilypond with
-dsafe="#t" (and not --jail) which is quite restrictive. Would it
be conceivable to make more Scheme-symbols public in safe mode in
future versions of LilyPond?

Example: ly:breathing-sign::divisio-maxima etc cannot be used.

A better solution would be to convince the Score-developer to use
--jail but this would perhaps demand too much from the server
owner?


I also don't have any control over the version of LilyPond that
is installed on the server (typically not so recent) and Score
does not attempt to convert the input file so files may break
when the version changes. I will ask the Score developer to use
convert-ly in the next version. Until then, it could be useful to
write ly-files that are sensitive to the version of lilypond.
Moreover, even if a conversion is in place, it would be useful to
access more recent features if present. Thus, I have two
scenarios:

1) I would like to use certain features if they are
available (version >=2.16 say)

\version "2.14.2"

if version >= 2.16 then
  lily-code
fi


2) Manually convert between versions

\version "2.14.2"

if version >= 2.16 then
  converted lily-code
else
  old lily-code
fi


Since the lily-code is running in safe-mode, as mentioned above,
there is a very limited repertoire of scheme code that can be
used (e.g. ly:parser-include-string cannot be used).

Is such conditional lily-code possible to write? In safe mode?

Thanks in advance,
David





reply via email to

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