Federico Bruni <[email protected]> writes:

> As you can see in the example below, an error in a variable which is
> present in two contexts (Staff and TabStaff) is printed twice:
>
> \version "2.19.1"
>
> music =  \relative c' {
>   c4 d e f g |
> }
>
> \score {
>   \new StaffGroup <<
>     \new Staff <<
>       \context Voice { \clef "G_8" \music }
>     >>
>     \new TabStaff  <<
>       \context TabVoice { \clef "moderntab" \music }
>     >>
>   >>
> }
>
> produces the following log:
>
> ###
> Parsing...
> Interpreting music...
> document.ly: warning: barcheck failed at: 1/4
>   c4 d e f g
>              |
> document.ly: warning: barcheck failed at: 1/4
>   c4 d e f g
>              |
> Preprocessing graphical objects...
> Finding the ideal number of pages...
> Fitting music on 1 page...
> ###
>
> I'm not sure if it's a bug. But the duplication can be a bit annoying when
> you work on a big file containing many errors (for example, because it's
> the result of an export which doesn't produce good lilypond code). I know I
> can skip the duplicate,  but a cleaner log would be nice.
>
> Would it be possible to print only once occurrence of an error in a
> variable?

It's not the same error.  I can perfectly well write

\new Staff { \time 5/4 \music }

or

\new Staff { \partial 4 \music }

and either will not trigger a barcheck error.  So it's not that \music
contains an error: whether it is an error (and how much the bar check is
actually off) or not depends on the context in which it is used.

-- 
David Kastrup


_______________________________________________
bug-lilypond mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-lilypond

Reply via email to