On 19/01/2026 03:28, David F. wrote:
Thanks for your reply, Timothy.  But "(ly:parser-output-name)” does not appear to have the -o applied to it.  It looks like, because I’m specifying a directory with -o, it is changing the working directory instead of prepending it to the parser-output-name.

This tracks the directory change as well.

\version "2.24.0"

#(let* ((input (canonicalize-path (car (ly:input-file-line-char-column (*location*)))))
        (ipfile (basename input ".ly"))
        (ipdir (dirname input))
        (opfile (ly:parser-output-name))
        (cwd (canonicalize-path (getcwd))))
  (when (and (string=? ipfile opfile) (string=? ipdir cwd))
    #{ \bookOutputName "newname" #}))

{
  c'1
}


--
Timothy Lanfear, Bristol, UK.

Reply via email to