Richard Shann <rich...@rshann.plus.com> writes: > On Sun, 2017-06-04 at 17:48 +0200, Simon Albrecht wrote: >> On 04.06.2017 15:50, Knute Snortum wrote: >> > I post to Mutopia so I can't have warnings. Any thoughts? >> >> Sometimes one has to accept warnings, so in future situations >> ly:expect-warning might be your friend (unless it is banned from >> Mutopia? I’d be surprised). It only needs the beginning of the warning >> string, like >> #(ly:expect-warning "cannot have") > > Simon - I was intrigued by this comment of yours and wondered if you > could say where this bit of Scheme needs to be placed?. > I tried to suppress clashing note column warnings thus: > > 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8>< > \version "2.18.0" > #(ly:expect-warning (_ "ignoring too many clashing note columns")) > MvmntIVoiceI = { > #(ly:expect-warning (_ "ignoring too many clashing note columns")) > c''4 c'' c'' > } > MvmntIVoiceII = { > #(ly:expect-warning (_ "ignoring too many clashing note columns")) > c''4 c'' c'' > } > \score { > \new Staff = "Part 1" << > \new Voice = "MvmntIVoiceI" \MvmntIVoiceI > > \new Voice = "MvmntIVoiceII" > \MvmntIVoiceII > >> > } > 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8>< > > I found by trial-and-error that if I remove any of the three occurrences > of the ly:expect-warning the warning returns. > > Where should it be called?
At the top, once for every expected warning. It doesn't make sense placing it in music expressions: its effect will be immediate anyway and it does not become part of the music. But you need to expect the right order and number of warnings. -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user