bug-lilypond
[Top][All Lists]
Advanced

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

Re: Issue 3471: bug?


From: David Kastrup
Subject: Re: Issue 3471: bug?
Date: Sat, 31 Aug 2013 17:21:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Thomas Morley <address@hidden> writes:

> Hi,
>
> in the light of issue 3471
> http://code.google.com/p/lilypond/issues/detail?id=3471
> I thought I could write:
>
>
> \version "2.17.25"
>
> {
>     \override TextScript.font-size = -1.0
>     a1^"xy"
> }
>
>
> Though an error returns.
>
> Did I misunderstood or is it a real bug?

An override is not a music function, so this is not strictly covered by
issue 3471.  Actually, 1.0 is accepted just fine.  It is just that we
are in music mode, and so things like -3 are a valid music expression (a
fingering, actually).  Or they would be...  It turns out that the
expression accepted for overrides is restricted ("closed") and
consequently can't end in a post-event, including being a post-event
like -3.

Now the magic between "closed" and normal expressions requires that the
closed expressions are a proper subset of the open ones, so we can't
easily introduce -3 with a different meaning even for closed expressions
where it can't be a fingering, and it would be strange to allow -3.0
when -3 has a totally different meaning.

Why can we do this for music functions but not for overrides?  Because
music functions declare the types of their arguments.  A pass-all
argument like scheme? (like \tweak uses, actually) will probably not be
quite convincing in all respects: it indulges in some guessing as well
as backtracking to arrive at a somewhat consistent result.  When the
argument type is explicitly number? or ly:event?, that trumps guesswork.

Overrides don't do that kind of type coercion.  Maybe it would be nice
if they did for non-nested overrides (where we _do_ have typechecking
information available).

At any rate, it's not as much a bug as a can of worms.  I can try to see
whether I can shake that can of worms into a more palatable arrangement
regarding overrides, but don't get your hopes too high.

It would appear to make sense to let the interpretation of the right
side of proper assignments and of overrides and of music function
arguments of type scheme? be somewhat similar.

Since "proper" assignments often involve music, and they are often
disambiguous because of being at top level, one should probably just
focus on the "scheme? argument" and "\override argument" similarity.
After all, it makes sense if \tweak and \override interpret the value
argument in the same manner.

-- 
David Kastrup




reply via email to

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