lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: #(ly:expect-warning "")


From: Simon Albrecht
Subject: Re: #(ly:expect-warning "")
Date: Tue, 20 May 2014 22:49:28 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.4.0


Am 18.05.2014 13:46, schrieb David Nalesnik:
Hi Simon,


On Sun, May 18, 2014 at 5:57 AM, Simon Albrecht <address@hidden> wrote:
Hello,

I just tried to suppress a series of expected warnings, but the scheme function seems to suppress only the first of a kind. See attached file. Why is this?


Each call suppresses a single instance, so you need to repeat it for each warning.  I don't know the rationale for this.
Now you say it: it does make sense, since when there is one occurence of a warning that you already know of and want to suppress, you might still be happy to see it when the same warning is issued another time from an unrelated reason.
In any case, you could put something like this at the head of your file.  I guess copy-and-paste would be equally effective :)

 #(define (suppress message x)

  (let loop ((c x))

    (if (> c 0)

       (begin

        (ly:expect-warning message)

        (loop (1- c))))))


#(suppress "MIDI channel wrapped around" 5)

#(suppress "remapping modulo 16" 5)


Note there's also a warning for expected error NOT encountered.


HTH,

David


Thanks a lot, Simon


reply via email to

[Prev in Thread] Current Thread [Next in Thread]