David, you wrote Monday, June 05, 2017 5:34 PM
> Richard Shann <rich...@rshann.plus.com> writes: > >> 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. Why does it not make sense to place it in a music expression? I find keeping the suppression adjacent to the place the warning is triggered helps to remind me why it is there. For example, \change Staff causes warnings when used with \partcombine, even though it actually works correctly, so I suppress the warnings like this: % The following \change Staff commands cause warnings % about not being able to find a context to switch to, % but in fact they work correctly. #(ly:expect-warning "cannot find context to switch to") \change Staff = "PianoRHStaff" aes'4 f #(ly:expect-warning "cannot find context to switch to") \change Staff = "PianoLHStaff" ees | % 45 The close association makes everything clear in a way placing the expect-warning at the top would not. Or have I missed some subtlety? Trevor --- This email has been checked for viruses by AVG. http://www.avg.com _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user