lilypond-user
[Top][All Lists]
Advanced

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

Re: accessing current file name in markup function


From: Jeff Olson
Subject: Re: accessing current file name in markup function
Date: Thu, 7 Dec 2023 11:47:33 -0700
User-agent: Mozilla Thunderbird

On 12/6/2023 3:48 PM, David Kastrup wrote:
\version "2.24.2"

locationOf =
#(define-scheme-function () ()
   (apply format #f "~a:~a:~a:~a" (ly:input-file-line-char-column (*location*))))


\markup { \locationOf }

Documentation question from trying to understand *location* in David's solution:

I found that function in the IR documentation[1], but I could not find the definition of a sip:

Function: ly:input-file-line-char-column sip

Return input location in sip as (file-name line char column).

Guessing, is sip a stream input pointer?  Where would I look to find the definition/example of sip?

Or, David, does *location* mean a string literal containing the name of the file like "eso.ly"?

[1] https://lilypond.org/doc/v2.24/Documentation/internals/scheme-functions#index-ly_003ainput_002dfile_002dline_002dchar_002dcolumn

TIA,
Jeff


reply via email to

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