Re: Where was my music-function called?

Graham King <[email protected]> Fri, 24 Jul 2026 13:59:34 +0100
Newsgroups gmane.comp.gnu.lilypond.general
Message-ID <[email protected]>
On Fri, 2026-07-24 at 13:51 +0100, Timothy Lanfear wrote:
> =C2=A0
> On 24/07/2026 13:11, Graham King wrote:
> =C2=A0
> =C2=A0
> > =C2=A0
> > 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.
> > =C2=A0
> =C2=A0\version "2.27.1"
> =C2=A0
> =C2=A0insertC =3D #(define-music-function ()()
> =C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (ly:message "insertC call=
ed at line ~a" (*location*))
> =C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 #{ c'1 #} )
> =C2=A0
> =C2=A0{ \repeat unfold 3 { c' d' e' f' }
> =C2=A0=C2=A0 \insertC
> =C2=A0}

Brilliant!  Thank you!