On Mon, Mar 3, 2025 at 7:21 AM Gianmaria Lari <[email protected]>
wrote:
> If you just want to ignore the warning, you could do this:
>>
> [...]
>
>> #(ly:expect-warning "articulation failed")
>>
>
> Oh, thank you Knute! Yes, this prevents lilypond from writing the warning.
>
> How does it work? Does it prevent all "articulation failed" warnings that
> might appear in the program, or just the first one? If it prevents all
> articulation warnings, then its usefulness is somewhat limited :(
>
ly:expect-warning only catches the first warning it encounters. If you
*do* want it to capture many warnings, you can define:
% % ly:expect-warning only works to suppress once. This function allows
% % you to specify the number of times a warning appears.
#(define ly:expect-warning-times (lambda args
(for-each (lambda _ (apply ly:expect-warning (cdr args)))
(iota (car args)))))
And use it like this:
#(ly:expect-warning-times "text of warning" 5)
--
Knute Snortum