bug-lilypond
[Top][All Lists]
Advanced

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

Re: Feature request: let \layout accept several \layouts stored in varia


From: David Kastrup
Subject: Re: Feature request: let \layout accept several \layouts stored in variables
Date: Sun, 15 Jul 2018 17:58:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Simon Albrecht <address@hidden> writes:

> On 15.07.2018 16:48, David Kastrup wrote:
>> What?  Being able to specify two conflicting \layout definitions at once
>> and having LilyPond magically merge them by guessing correctly how the
>> user wants every conflict to be resolved?
>>
>> Magic is always a great thing to wish for.  Until it does stuff you
>> actually did not intend it to do.
>
> That’s not what the request was about. Lily already merges subsequent
> toplevel layout definitions,

No, it doesn't.  It applies the given assignments to the existing
current layout definition, yielding a new layout definition without any
memory of how it got there.

> IIUC simply following the order at which they are encountered, and why
> shouldn’t the same be possible inside one layout block?

Because you don't have a sequence of assignments and definitions any
more but two full \layout blocks that have been independently created
without any history of how that has happened.

People think all the time that juggling around text blocks in their
editor does not in any way change the meaning.

But what you are juggling is not an "instruction taking the current
\layout block and adding some definitions to it" but rather "a
full-featured \layout block".

The former would be

xxx =
#(define-void-function ()()
   (module-define! (current-module) 'whatever 3))

not
xxx =
\layout { whatever = 3 }

-- 
David Kastrup



reply via email to

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