Am Mi., 5. Mai 2021 um 17:57 Uhr schrieb David Kastrup <d...@gnu.org>:
>
> David Sumbler <da...@aeolia.co.uk> writes:
>
> > I am sure this must have been answered many times, yet after an hour's
> > searching I can't find a solution.
> >
> > How can one display the current values of internal variables?  E.g., if
> > I want to know the current value of Staff.keepAliveInterfaces, how can
> > I get this to be displayed during compilation of a score?
> >
> > David
>
> \context Staff \applyContext #(lambda (c)
>                                 (display (ly:context-property c
>                                 'keepAliveInterfaces)))
>
>
> --
> David Kastrup
>

Probably even more generic (and with a different printing function):

{
  s1
  \applyContext
    #(lambda (ctx)
      (newline)
      (pretty-print
        (ly:context-property
          (ly:context-property-where-defined ctx 'keepAliveInterfaces)
          'keepAliveInterfaces)))
  s1
}

Cheers,
  Harm

Reply via email to