lilypond-devel
[Top][All Lists]
Advanced

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

Re: Overrides and nesting: intentional?


From: David Kastrup
Subject: Re: Overrides and nesting: intentional?
Date: Fri, 05 Aug 2011 22:02:39 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Reinhold Kainhofer <address@hidden> writes:

> Am Freitag, 5. August 2011, 19:08:43 schrieb David Kastrup:
>> Proposal 1: \override should not start with an internal \revert but
>> rather do just what the user documentation says: push its own version in
>> front of the existing alist of properties, without deleting existing
>> overrides.
>
> That's what I would expect, too. 
> Of course, then the list of overrides will grow with every override and might 
> be quite large for a very long score...

Hm?  Either you want to override once, then the net result on the stack
is none anyway, or you want to override permanently, then their is no
growth, or you switch back and forth, then you'll need to revert in
between.  But as things are currently, it is impossible to use \override
for establishing a basic setting in the context: with the first
\override/\revert pair, the basic setting is _gone_.  And you can't use
\set for grob properties, either.

>> Obviously, something considered bad will happen, or the code would
>> not go to the pains to do what it does now.  What is the bad thing
>> that will happen?
>
> I think that only Han-Wen can answer that question. That behavior
> (revert if the music property pop-first ist set) was introduced in
> between versions 1.3.109 and 1.3.111 (commit
> f085824b2182c1f0fa2c5118884770ac7ff775c7 ) in November 2000.

cda8fc1780778b760905c8832f7e984161218f20 I see.

Author: Han-Wen Nienhuys <address@hidden>>  Sun Nov 26 20:06:46 2000
Committer:      Han-Wen Nienhuys <address@hidden>>  Sun Nov 26 20:06:46 2000

release: 1.3.111

============

[...]

* Changed syntax \push -> \override, \pop -> \revert. Add:

        \property Context.Element \set #'foo = #bar

which  does a \revert followed by a \override.

[...]

But if you take a look to see where it is set, namely in parser.yy,
you'll see that it just pertains to \set here:

      | PROPERTY STRING '.' STRING SET embedded_scm '=' embedded_scm {
                Music *t = new Music;
                t->set_mus_property ("iterator-ctor",
                        Push_property_iterator::constructor_cxx_function);
                t->set_mus_property ("symbols", scm_string_to_symbol ($4));
                t->set_mus_property ("pop-first", SCM_BOOL_T);
                t->set_mus_property ("grob-property", $6);
                t->set_mus_property ("grob-value", $8);
                Context_specced_music *csm = new Context_specced_music (t);
                $$ = csm;
                $$->set_spot (THIS->here_input ());

                csm-> set_mus_property ("context-type", $2);
        }

So no, this is not the answer.  At this point of time, \set was
available, and only \set does a pop before push.

-- 
David Kastrup




reply via email to

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