> How can I access the current LilyPond input file name from within a > markup command? Or do I have to use the (undocumented) > `delay-stencil-evaluation` functionality?
If you mean the name of the file from which the command is called (vs. defined), you can't — markups don't store location info, unfortunately. If you really need a workaround, you can make your markup command require a ly:music? argument and give {{}} for this argument when calling it. Then you can use the 'origin property of that music object, e.g., \version "2.24.2" #(define-markup-command (foo layout props loc-provider) (ly:music?) (display (ly:input-file-line-char-column (ly:music-property loc-provider 'origin))) empty-stencil) \markup \foo {{}}
signature.asc
Description: This is a digitally signed message part