Marc Hohl <m...@hohlart.de> writes: > optional-slurs.ly > ================== > > \version "2.15.23" > > #(ly:add-option 'no-slurs #f > "Whether to print a slur or not.") > > slurSwitch = #(define-music-function (parser location) () > (if (eq? #t (ly:get-option 'no-slurs)) > #{ \override Slur #'transparent = ##t #} > #{#})) > > test = { > \slurSwitch > c2 ( d ) > } > > \score { \test } > > ================== > > If I call it with > >> lilypond optional-slurs.ly > > everything is fine; when I use > >> lilypind -d no-slurs optional-slurs.ly > > I get a warning that option 'no-slurs is > undefined, and the slurs are still visible.
I'd expect command line options to be processsed *before* the argument files, so you cannot define a new command line option *in* an argument file. Try defining the command line option in a setup file. -- Johan _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user