lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Displaying internal variables


From: Thomas Morley
Subject: Re: Displaying internal variables
Date: Wed, 5 May 2021 18:22:36 +0200

Am Mi., 5. Mai 2021 um 17:57 Uhr schrieb David Kastrup <dak@gnu.org>:
>
> David Sumbler <david@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

[Prev in Thread] Current Thread [Next in Thread]