lilypond-devel
[Top][All Lists]
Advanced

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

Re: parser.yy: rearrange to allow more lenient use of music arguments fo


From: David Kastrup
Subject: Re: parser.yy: rearrange to allow more lenient use of music arguments for music functions. (issue4815052)
Date: Fri, 29 Jul 2011 19:24:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Reinhold Kainhofer <address@hidden> writes:

> Am Freitag, 29. Juli 2011, 12:24:43 schrieb address@hidden:
>> On 2011/07/29 08:55:24, Reinhold wrote:
>> > Can you give some explicit examples that your patch now allows that
>> > didn't work before (preferrably as a regtest, so we notice when a future
>> > parser change breaks it)?
>> 
>> Well, one could now move a few things like \relative and \transpose into
>> music functions (and Scheme-callable functions for the hard work, for
>> efficiency's sake).
>> 
>> That would be a quite reliable regtest...
>
> Actually, I think we should add a really simple test case to the regtests, 
> like your example of \staffposition-at d' below.
>
>> \tweak still works just the same.  But you could, for example, write
>> something like
>> \staffposition-at d'
>> that resulted in a tweak of the next element to have it land in the
>> position of a d'.
>
> Can you turn that "could" into real lilypond code in a regtest, so
> that (1) we have a simple test case to check whether future parser
> changes affect this and (2) people like me, who easier understand
> things by examples, see what this patch achieves?
>
> Quite often, I have found that trying to create a very simple regtest,
> I found several problems in my patches, because when thinking
> theoretically I might have missed how people would actually use the
> features.

Straightforward to do (I did it but did not keep the code): take the
code for \tweak in music-functions.ly and tweak it in the
straightforward way.  Works.

But that is not a readable example.  So I want to modify #{...#} first
so that I can use it for wrapping \tweak insteak of copying its code.

-- 
David Kastrup



reply via email to

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