On Jan 21, 2020, at 11:31, Jan-Peter Voigt <jp.vo...@gmx.de> wrote: > I'd like that, though it would be a quite invasive change. > And if we stay with the string for the context id and then use > lists/paths in the \context statement like > \new Staff = "choir" << \new Voice = "soprano" … > > and then use > \context Voice = choir.soprano > > it would be inconsistent with \new <Context> = "…" > > I will write down some more text about this topic later.
I see similarities with languages like CSS and XPATH select nodes in a DOM. Notation borrowed directly from them will not integrate well into LilyPond, but it might be fruitful to ask how we could modify expressions like these to fit in. %% find the voice in the example quoted above, very specifically \context Staff#choir > Voice#soprano { … } % CSS \context Staff[@id=choir]/Voice[@id=soprano] { … } % XPATH %% ditto, but using context type only \context Staff > Voice { … } % CSS \context Staff/Voice { … } % XPATH %% ditto, but using ID only \context #choir > #soprano { … } % CSS \context [@id=choir]/[@id=soprano] { … } % XPATH %% find the context where the rehearsalMark property is defined \context [rehearsalMark] { … } % CSS \context [@rehearsalMark] { … } % XPATH — Dan