Re: Snippet 960 fails with Ly 2.25

Thomas Morley <[email protected]>
Newsgroups gmane.comp.gnu.lilypond.bugs
Message-ID <CABsfGyUZ=gu2ef6knZhLiCHdpV4BYzxu1_qm70aV4L71KV57MQ@mail.gmail.com>
Am Di., 2. Apr. 2024 um 00:21 Uhr schrieb K. Blum via bug-lilypond
<[email protected]>:
>
> Hello,
>
> LSR snippet 960 works alright with LilyPond 2.24.3 and earlier.
> Ly 2.25.1 (and later) aborts with an error message, see below.
> In the docs I haven't found any changes to the functions in use.
> Also tried convert-ly, but it did not change anything from the code.
> Am I missing something or is this a bug?
>
> Snippet 960: https://lsr.di.unimi.it/LSR/Item?id=960
>
> Here is a (not quite) MWE:
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> colorSpan =
> #(define-music-function (y-lower y-upper color)
>     (number? number? color?)
>     #{
>       \once \override HorizontalBracket.stencil =
>       $(lambda (grob)
>          (let* (
>                  (area (ly:horizontal-bracket::print grob))
>                  (X-ext (ly:stencil-extent area X))
>                  (Y-ext (ly:stencil-extent area Y)))
>            (set! Y-ext (cons y-lower y-upper))
>            (ly:grob-set-property! grob 'layer -10)
>            (ly:make-stencil (list 'color color
>                                   (ly:stencil-expr (ly:round-filled-box
> X-ext Y-ext 0))
>                                   X-ext Y-ext))))
>       \once\override HorizontalBracket.Y-offset = #0
>     #})
>
> \score {
>    {
>      \colorSpan #-4 #4 #green
>      c'2\startGroup g' c'\stopGroup r
>    }
>    \layout {
>      \context {
>        \Voice
>        \consists "Horizontal_bracket_engraver"
>      }
>    }
> }
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> The error message from Ly 2.25.1 reads:
> -----------------------------------
> Starte lilypond.exe 2.25.1 [mwe.ly]...
> »C:/Users/Flower/AppData/Local/Temp/frescobaldi-0hwxag11/tmp9kixmwyv/mwe.ly«
> wird verarbeitet
> Analysieren...
> Interpretation der Musik...
> Vorverarbeitung der grafischen Elemente...
> Ideale Seitenanzahl wird gefunden...
> Musik wird auf eine Seite angepasst...
> Systeme erstellen...
> C:/Portable/lilypond-2.25.1/share/lilypond/2.25.1/ly/init.ly:64:2:
> Fehler: Guile signaled an error for the expression beginning here
> #
>   (let ((book-handler (if (defined? 'default-toplevel-book-handler)
> In procedure cadddr: Wrong type (expecting pair): ()
> Wurde mit dem Return-Code 1 beendet.
>

Fixed in LSR.
Works now for 2.24 and 2.25

Cheers,
  Harm
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.