Mike Solomon <[email protected]> writes:

> On Oct 14, 2013, at 6:20 PM, David Kastrup <[email protected]> wrote:
>
>> David Kastrup <[email protected]> writes:
>> 
>>> Mike Solomon <[email protected]> writes:
>>> 
>>>> hmm…for a slightly less minimal example, I'm trying to do:
>>>> 
>>>> bc = |
>>>> 
>>>> foo = { \bc \bar "|" }
>>>> 
>>>> {
>>>> a a a a a \foo
>>>> }
>>>> 
>>>> Any ideas on how to accomplish that?
>>> 
>>> Simple.  First fix
>>> <URL:http://code.google.com/p/lilypond/issues/detail?id=2392>

Fixed.

> Probably a separate issue, but when I do:
>
> \version "2.17.30"
>
> mybarcheck = { | }
>
> { a \mybarcheck }
>
> I get
>
> GNU LilyPond 2.17.30
> Processing `foo.ly'
> Parsing...
> Interpreting music...
> foo.ly:3:14: warning: barcheck failed at: 1/4
> mybarcheck = 
>              { | }
> Preprocessing graphical objects...
> Finding the ideal number of pages...
> Fitting music on 1 page...
> Drawing systems...
> Layout output to `foo.ps'...
> Converting to `./foo.pdf'…
>
> Is there anyway to have the parser spit out the line number of the bar
> check failure instead of the line number of the definition of the
> variable?

No, and it would imply that if you wrote
violinI = { 500 bars of music }

\new Staff { \violinI }

that error messages would point to \new Staff only.  As long as the
input origin is a file location rather than a _stack_ of file locations,
one has to make a choice, and this choice makes a lot of sense.  Now you
are lucky since if you really need it, you can write

mybarcheck = #(define-music-function (parser location) () #{ { | } #})
{ a \mybarcheck }

and get what you want.  That's issue 3153 I think, as of 2.17.13.

-- 
David Kastrup

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

Reply via email to