lilypond-devel
[Top][All Lists]
Advanced

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

Re: Issue 4495 Remove unnecessary #{ .. #} constructs (issue 253310043 b


From: David Kastrup
Subject: Re: Issue 4495 Remove unnecessary #{ .. #} constructs (issue 253310043 by address@hidden)
Date: Sun, 19 Jul 2015 20:39:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Trevor Daniels <address@hidden> writes:

> address@hidden wrote Saturday, July 18, 2015 11:02 PM
>
>
>> One thing that you have to be aware of is that
>> #{ \music #}
>> is not equivalent to music but rather to
>> (ly:music-deep-copy music (*location*))
>> since it creates a copy of the music and puts the point-and-click
>> information to the call of the containing music function.
>>
>> Now I don't really know whether you want the (*location*) here: it would
>> likely substitute less useful origin information when everything points
>> to the call of the template.  But for any music that is potentially used
>> more than once, you definitely want a copy.  If you don't use a copy,
>> then any \relative or \transpose of the music in one place will appear
>> in all other places as well, which usually means that you get more
>> invocations of \relative or \transpose on any particular appearance than
>> you intended.
>
> I *think* what I have is OK.  None of the music variables are used
> more than once in the template

Ah, ok.

> Hhm.  Not sure about *location*, but I think it would be more useful
> to the user to point to the template call rather than to a line in
> ly/voice.t-kit

Oh.  Yes, definitely.  When you don't need to create a copy of your own,
just (set-origin! x) will set the origin of a music variable x or of all
elements of a music list x to (*location*).

>> https://codereview.appspot.com/253310043/

-- 
David Kastrup



reply via email to

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