bug-lilypond
[Top][All Lists]
Advanced

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

Re: NEWS source typo: \override NoteHead #'duration-log = 1


From: Erik Sandberg
Subject: Re: NEWS source typo: \override NoteHead #'duration-log = 1
Date: Mon, 20 Nov 2006 09:17:27 +0100
User-agent: KMail/1.9.5

On Sunday 19 November 2006 16:27, Trevor Bača wrote:
> On 11/19/06, John Mandereau <address@hidden> wrote:
> > Trevor Bača wrote:
> > > Minor point that the NEWS source for the feature reads
> > >
> > >   \override NoteHead #'duration-log = 1
> > >
> > > and should instead read
> > >
> > >   \override NoteHead #'duration-log = #1
> >
> > Hi Trevor,
> >
> > I've just tested the snippet both with and without a hash before the
> > "1". In fact, the hash isn't required here before the number, so that's
> > not a typo. Someone who knows more about the parser than me may tell you
> > why.
>
> Hi John,
>
> Well this is odd. Take a look at this one:
>
> %%% BEGIN %%%
>
> \version "2.10.0"
>
> \new Staff \with {
>    \override NoteHead #'duration-log = 1
>    } {
>    c'4
> }
>
> %%% END %%%
>
> GNU LilyPond 2.10.0
> Processing `349.ly'
> Parsing...
> 349.ly:4:44: error: syntax error, unexpected UNSIGNED, expecting
> SCM_IDENTIFIER or SCM_TOKEN
>         \override NoteHead #'duration-log =
>                                             1
> 349.ly:5:10: error: errors found, ignoring music expression
>         }
>           {
> error: failed files: "349.ly"
>
>
> The syntax error goes away iff we put the hash back in.
>
> But the hash can safely go away outside the \with block:
>
> %%% BEGIN %%%
>
> \version "2.10.0"
>
> \new Staff {
>    \override NoteHead #'duration-log = 1
>    c'4
> }
>
> %%% END %%%
>
> That one works perfectly.
>
> How odd. Must be something about the parser being less tolerant inside
> the \with block or something ...
>
> Erik?

Yes, that's true. There are separate rules for \override inside \context and 
inside music (this is also visible because \set foo=bar is written like 
foo=bar in \context). I intend to fundamentally change \context blocks before 
2.12, this will hopefully fix this problem.

-- 
Erik




reply via email to

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