Home
Random
Log in
Settings
About LilyPond wiki
LilyPond wiki
Search
Editing
Expect a warning several times
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
There are times when your LilyPond source file prints warnings when compiled and you may want to suppress these warnings from the output. LilyPond has a Scheme function for this: <code>ly:expect-warning</code>. However, there are times when the same warning is printed several times and <code>ly:expect-warning</code> will only hide one warning at a time. Typing this function several times in a row is tedious. The [https://lilypond.org/doc/v2.24/Documentation/internals/scheme-functions Scheme function] below takes a string that will match some part of the warning, just like <code>ly:expect-warning</code>, but it also takes an integer for the number of times the warning is printed. <pre> #(define (expect-warning-times n . arg) (for-each (lambda _ (apply ly:expect-warning arg)) (iota n))) </pre> A usage example: <code>#(expect-warning-times 4 "omitting tuplet bracket")</code> [[Category:Scheme]]
Summary:
Please note that all contributions to LilyPond wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Meta:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)