How do you get values from a context property? I'm trying to access the left-bound text. I know I can do it like this: (cdr (car (cdr (car (cdr (car (car (ly:context-property context 'TextSpanner))))))))))) but that's kind-of ugly.
This code: #(define (format-textspan engraver event) (let* ((context (ly:translator-context engraver)) (moment (ly:context-current-moment context))) (display "\n") (display (ly:context-property context 'TextSpanner) ) )) produces the following (with linebreaks and indents added). I'm really confused about the multiple "bound-details", the multiple "left/right" inside each bound-details, etc. How can I make sure I get the bound-details that I want, without using plain old (car ...) ? ( (bound-details (left (text . II) (stencil-align-dir-y . 0) (Y . 0) (padding . 0.25) (attach-dir . -1)) (right (text #<procedure line-markup (layout props args)> ((#<procedure draw-line-markup (layout props dest)> (0 . -1)))) (padding . -1) (Y . 0) (padding . 0.25)) (left (stencil-align-dir-y . 0) (Y . 0) (padding . 0.25) (attach-dir . -1)) (right (padding . -1) (Y . 0) (padding . 0.25)) (left (Y . 0) (padding . 0.25) (attach-dir . -1)) (left-broken (end-on-note . #t)) (right (Y . 0) (padding . 0.25)) ) (bound-details (right (text #<procedure line-markup (layout props args)> ((#<procedure draw-line-markup (layout props dest)> (0 . -1)))) (padding . -1) (Y . 0) (padding . 0.25)) (left (stencil-align-dir-y . 0) (Y . 0) (padding . 0.25) (attach-dir . -1)) (right (padding . -1) (Y . 0) (padding . 0.25)) (left (Y . 0) (padding . 0.25) (attach-dir . -1)) (left-broken (end-on-note . #t)) (right (Y . 0) (padding . 0.25)) ) (bound-details (left (stencil-align-dir-y . 0) (Y . 0) (padding . 0.25) (attach-dir . -1)) (right (padding . -1) (Y . 0) (padding . 0.25)) (left (Y . 0) (padding . 0.25) (attach-dir . -1)) (left-broken (end-on-note . #t)) (right (Y . 0) (padding . 0.25))) ... and so on... Cheers, - Graham _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user