Comment #3 on issue 2990 by [email protected]: \RemoveEmptyStaves in
StaffGroup context crashes
http://code.google.com/p/lilypond/issues/detail?id=2990
Got this figured out, but there is no good solution yet...
The issues is that \RemoveEmptyStaff needs to be called for the \Staff
context, as the \Staff context has both the Axis_group_engraver and the
Hari_kiri_engraver. Calling it on the StaffGroup context will remove an
Axis_group_engraver that does not exist and proceed to add a
Hari_kiri_engraver which will create VerticalAxisGroups on the StaffGroup
level. This will cause VerticalAxisGroups to add each other as each
others' elements lists.
There is currently no way to stop users from including, for example, a
Clef_engraver in the \Score context, meaning that anything can be put
anywhere, even if it doesn't make sense.
The best we can do for now is just weed out this recursive behavior, but as
for finding a way to hint to people not to do this sorta thing w/
engravers, I dunno what do do (aside from Documentation).