Valentin Petzel <[email protected]> writes:
> Am Mittwoch, 6. Dezember 2023, 23:10:11 CET schrieb Jean Abou Samra:
>> \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 {{}}
>
> Maybe a bit less esoteric:
>
> \version "2.24.2"
>
> locationOf =
> #(define-scheme-function (which) (ly:music?)
> (apply format #f "~a:~a:~a:~a" (ly:input-file-line-char-column
> (ly:music-property which
> 'origin))))
>
>
> \markup { \locationOf {} }
Or even less esoteric:
\version "2.24.2"
locationOf =
#(define-scheme-function () ()
(apply format #f "~a:~a:~a:~a" (ly:input-file-line-char-column (*location*))))
\markup { \locationOf }
--
David Kastrup