On Fri, 2026-07-24 at 13:51 +0100, Timothy Lanfear wrote:
>
> On 24/07/2026 13:11, Graham King wrote:
>
>
> >
> > I'm trying to debug some Scheme code, and it would be really
> > helpful to
> > be able to make a music-function display the lilypond source-code-
> > line-
> > number where the music-function was called.
> >
> \version "2.27.1"
>
> insertC = #(define-music-function ()()
> (ly:message "insertC called at line ~a" (*location*))
> #{ c'1 #} )
>
> { \repeat unfold 3 { c' d' e' f' }
> \insertC
> }
Brilliant! Thank you!