If I use ly:add-option in an external lilypond package to declare a new
option, e.g.
#(ly:add-option 'incipit #t
"Whether to print an incipit with the old key / clef (if provided).
If the 'ancient-style option is set to ##t, this option has no effect.")
lilypond will always set the option to the default value (#t) in this case.
Unfortunately, this will override any command-line option given.
For example, run the attached file as
lilypond -d my-option add-option.ly
As you will see in the output, in the beginning, the value is set to #t (the
value given on the command line), but the ly:add-option call explicitly sets
the value to the default #f, overwriting the command-line value...
So, how are custom options supposed to work???
Cheers,
Reinhold
--
------------------------------------------------------------------
Reinhold Kainhofer,
reinhold@...,
http://reinhold.kainhofer.com/ * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
*
http://www.fam.tuwien.ac.at/, DVR: 0005886
* LilyPond, Music typesetting,
http://www.lilypond.org[add-option.ly]
\version "2.13.7"
#(ly:message "my-option (undefined): ~a" (ly:get-option 'my-option))
#(ly:add-option 'my-option #f "Just a dummy option, #f by default. The value
given on the command line will be overwritten")
#(ly:message "my-option (now defined): ~a" (ly:get-option 'my-option))
_______________________________________________
lilypond-devel mailing list
lilypond-devel@...
http://lists.gnu.org/mailman/listinfo/lilypond-devel