Hi Paolo,

the culprit is a non-breakable space character.
Delete it.

Am Sa., 24. Dez. 2022 um 20:20 Uhr schrieb Paolo Prete <paolopr...@gmail.com>:
>
> Hello,
>
> I just noticed an inconsistent behavior with 2.25.0. The snippet below
> doesn't compile; I don't know if there is a hidden problem inside it, but
> it worked for all the versions prior to 2.25:

Nope, on my machine it failed for all versions.

>
> %-------------------------------------------------------------------
>
> test = #(define-music-function (parser location music) (ly:music?)
> (let
>   ((musiccpy '()))
>   (begin
>
>     (set! musiccpy (ly:music-deep-copy music))
>
>     (map-some-music (lambda (evt)
>       (let ((nameUp (ly:music-property evt 'name)))
>         (cond
>           ((eq? nameUp 'NoteEvent)
>               (set! evt '())
>             evt)
>           (else #f))
>         ))
>     musiccpy)
>
>  );; Here, right before the bracket
> #{ $musiccpy #}))
>
> {
>   \test { \tuplet 3/2 { e'8 s  s } }
> }
>
> %-------------------------------------------------------------------
>
> Some observations:
>
> 1) the snippet compiles if the tuplet is removed
> 2) the snippet compiles if map-some-music is don on $music, instead of
> $musiccpy

Can't confirm, see above.

>
> I don't know if it's a bug, but in any case, is there a way/workaround to
> fix it while preserving both ly:music-deep-copy and the tuplet?
>
> Thanks and Merry Christmas!
>
> Paolo

Cheers,
  Harm

P.S.
I take the code as a stripped down version of something larger, thus I
don't comment on the coding itself

Reply via email to