Re: generate a warning/error if tag is not specified

2018-04-13 Thread Gianmaria Lari
[ Is there any way to make lilypond complaint with a compilation
error/warning in case I don't  specify a \keepWithTag or \removeWithTag?]

On 13 April 2018 at 15:17, Knute Snortum  wrote:

> One way would be to use bar line checks (|) and \barNumberCheck:
>
> %%% Start
> \version "2.19.81"
> var = {
>   \time 3/4
>   a
>   \tag#'vera a
>   \tag#'verb b
>   a |
> }
> {\var}  %this should generate a warning
> {\keepWithTag #'vera \var} %this is ok!
> {\keepWithTag #'verb \var} %this is ok!
> {\removeWithTag #'vera \var} %this is ok!
> %%% End
>
>
Great! I was thinking to something like that but I have no idea what to use
to generate the dummy warning/error.

The reason of my question is that when I put a tag sometimes my variable
makes sense only if I use it with \keepWithTag or \removeWithTag so I want
a warning if I forgot to do it.

Thank you Knute!
g.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: generate a warning/error if tag is not specified

2018-04-13 Thread Knute Snortum
One way would be to use bar line checks (|) and \barNumberCheck:

%%% Start
\version "2.19.81"
var = {
  \time 3/4
  a
  \tag#'vera a
  \tag#'verb b
  a |
}
{\var}  %this should generate a warning
{\keepWithTag #'vera \var} %this is ok!
{\keepWithTag #'verb \var} %this is ok!
{\removeWithTag #'vera \var} %this is ok!
%%% End


---
Knute Snortum
(via Gmail)

On Fri, Apr 13, 2018 at 12:13 AM, Gianmaria Lari 
wrote:

> Suppose that I define a variable so that according to a tag I can generate
>
> a a a
>
> or
>
> a b a
>
>
> Is there any way to make lilypond complaint with a compilation
> error/warning in case I don't  specify a \keepWithTag or \removeWithTag?
>
> For example:
>
> \version "2.19.81"
> var = {
>   a
>   \tag#'vera a
>   \tag#'verb b
>   a
> }
> {\var}  #this should generate a warning
> {\keepWithTag #'vera \var} #this is ok!
> {\keepWithTag #'verb \var} #this is ok!
> {\removeWithTag #'vera \var} #this is ok!
> %etc.
>
>
> Thank you, g.
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user