Mats Bengtsson wrote Saturday, August 09, 2008 11:37 AM
Han-Wen Nienhuys wrote:

Perhaps we should have a nice scheme hack that will print out the
context hierarchy at any point.

That would be great!

Does this get close to helping?  A little more scheming to check
for the top context rather than hard-coding the number would generalise this.

contextHeirarchy =
 #(lambda (context)
   (format #t "Context heirarchy: ~a"
(ly:context-parent (ly:context-parent (ly:context-parent (ly:context-parent context))))))

\new Score = "Score 1" {
 \new StaffGroup = "StaffGroup 1" {
   \new Staff = "Staff 1" {
     \new Voice = "Voice 1" {
       { \applyContext \contextHeirarchy a }
     }
   }
 }
}

   /Mats

Trevor


_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to