lilypond-user
[Top][All Lists]
Advanced

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

Re: [OLL] Setting up options for local package


From: Urs Liska
Subject: Re: [OLL] Setting up options for local package
Date: Sun, 31 Mar 2019 01:17:34 +0100
User-agent: K-9 Mail for Android

Hi Pedro,

Am 30. März 2019 23:45:07 MEZ schrieb Pedro Pessoa <address@hidden>:
>Hello,
>I'm trying to use OLL infrastructure to organize my local toolset. I'm
>mostly trying to mimic the structure of other packages and modules.
>I've an
>aparently working package called 'local', where I intend to put all my
>personal tools as modules/submodules.
>

You may be surprised but I've never read from someone actually doing this - 
although it's exactly how it was intended.
I would just recommend using a more specific name than "local".

>I'm currently having an apparently simple problem dealing with options.
>The option I set on the loadPackage or loadModule "\with" does not take
>precedence over the value used in register the options.
>
>Eg:
>%%% file: local/package.ily
>
>\include "oll-core/package.ily"
>\registerOption local.option "A"
>#(display (getOption '(local option)))
>
>%%% end
>
>%%% file: whatever/project.ly
>
>\include "oll-core/package.ily"
>\loadPackage \with {
>       option = "B"
>} local
>
>%%% end
>
>-- Outputs: "A"
>
>
>
>
>I've came up with a workaround, but then I tought that is most likely I
>just
>don't know how to proper handle it. "\registerDefaultOpt" is a simple
>function that only register the value if the option is unregistered.
>
>%%% file: local/package.ily
>
>\include "oll-core/package.ily"
>\registerDefaultOpt local.option "A"
>#(display (getOption '(local option)))
>
>%%% end
>
>%%% file: whatever/project.ly
>
>\include "oll-core/package.ily"
>\registerOption local.option "B"
>\loadPackage local
>
>%%% end
>
>-- Outputs: "B"
>
>
>
>So the question is: how to properly handle this?

I'll look into it (but not tonight). Right now I can't tell if you are dealing 
with a limitation I still have to remove.

Urs

>Cheers,
>-- Pedro Pessoa
>
>
>
>--
>Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
>
>_______________________________________________
>lilypond-user mailing list
>address@hidden
>https://lists.gnu.org/mailman/listinfo/lilypond-user



reply via email to

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