lilypond-user
[Top][All Lists]
Advanced

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

Re: problems with user-defined command line options


From: Johan Vromans
Subject: Re: problems with user-defined command line options
Date: Sat, 24 Dec 2011 16:06:43 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Marc Hohl <address@hidden> 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



reply via email to

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