lilypond-user
[Top][All Lists]
Advanced

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

Re: ly:expect-warning (was Re: Slur from one voice to another emitswarni


From: Trevor Daniels
Subject: Re: ly:expect-warning (was Re: Slur from one voice to another emitswarning)
Date: Fri, 9 Jun 2017 22:47:46 +0100

David, you wrote  Monday, June 05, 2017 5:34 PM


> Richard Shann <address@hidden> 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

reply via email to

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