[Top][All Lists]

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

Re: Implement \once as music function able to operate on complex stuff.

From: dak
Subject: Re: Implement \once as music function able to operate on complex stuff. (issue 5322065)
Date: Thu, 03 Nov 2011 12:57:26 +0000

On 2011/11/03 11:45:00, Reinhold wrote:
File input/regression/ (right):
input/regression/ \unHideNotes  g a
\once\hideNotes b c |
While this is the easy approach, it builds on the fact that hideNotes
internally implemented as a music expression with several \override
commands. If
that internal representation ever changes, we won't have a proper
regtest any
I would prefer to define the multiple property operations command
explicitly in
the regtest, so we have complete control and no risk that a totally
change might break a regtest (without us even noticing).

I.e. I would explicitly do
multipleOperations = {
   \override #'NoteHead #'color = #red
   \override #'Stem #'color = #blue

and then \once\multipleOperations.

I disagree.  The whole point of redefining \once is to make it useful
for _existing_ functions/variables known to work by meddling with

Regtests also serve as illustrations of functionality.  Defining an
explicit sandbox for the regtest to work on is completely eliminating
its educational value.

I consider it very unlikely that changing \hideNotes in a manner where
it would either
a) work with the previous definition of \once
b) keep working with the new definition of \once while failing to work
   with a sandbox like the above
is feasible at all.

So I consider the regtest as _fully_ doing its intended job.  The whole
point of the change is that you can use \once on existing commands like
\hideNotes.  That's the desired and intended behavior.

reply via email to

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