bug-lilypond
[Top][All Lists]
Advanced

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

Re: Make defining new contexts simpler with better \alias functionality


From: Paul Morris
Subject: Re: Make defining new contexts simpler with better \alias functionality
Date: Fri, 6 Mar 2015 10:41:06 -0700 (MST)

David Kastrup wrote
> That does not work since contexts have no notion of what other contexts
> may accept them and \denies does not maintain a list of its own but just
> removes material from the \accepts lines.  If an alias is to be accepted
> in lieu of an actual context, there is no way to dial back the
> acceptance.

Ah I see, yes if contexts have no "denies" list then this won't work.  


David Kastrup wrote
> I think it would make more sense to have a command that will walk
> through an output definition and make the required changes, like
> 
> \accept-like Voice myVoice
> \layout {
>   \context {
>     \Voice
>     \name "myVoice"
>     ...
>   }
> }
> 
> That does not require new internals and is pretty straightforward to
> write as a scheme function taking two symbols and an output definition
> as arguments and returning an output definition.

That makes sense to me.  It gets the job done without having to change the
internals.  Setting up the default contexts is a different kind of task than
a user copying and modifying one of them.  So this may be the best way to
provide for the latter.  Thanks for weighing in on this and for providing
the proof of concept.

(The only possible down side I see is that users may find it strange to
supply an output definition as a function argument, but I don't know of a
way around that.)

-Paul







--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Make-defining-new-contexts-simpler-with-better-alias-functionality-tp172723p172743.html
Sent from the Bugs mailing list archive at Nabble.com.



reply via email to

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