(With list cc this time)

Thanks David for the quick clear response.

Your reply gives me the tool to think about this the best way; my mental model 
was more based on the way the C preprocessor works.

Now I can go and fix my score without thinking of it as a workaround. Thanks!

Marcus Redivo

> On Apr 2, 2025, at 7:30 AM, David Kastrup <d...@gnu.org> wrote:
>
> Marcus Redivo <marcus.red...@whimsica.ca> writes:
>
>> It appears that the content of an excluded tag still affects the
>> octave in \relative-pitched music.
>>
>> I would expect the following two lines of code to produce identical output:
>>
>> \version "2.24.4"
>> \keepWithTag #'A \relative { a \tag #'A { e' } \tag #'B { e' } }
>> \keepWithTag #'B \relative { a \tag #'A { e' } \tag #'B { e' } }
>>
>> But in fact they do not: the E produced by the second line is an
>> octave higher than the first (screenshot attached).
>>
>> The workaround is to leave off the tick in the B tag section, but this
>> doesn’t make the intention clear:
>>
>> \keepWithTag #'B \relative { a \tag #'A { e' } \tag #'B { e } }
>>
>> Is this intended behaviour, or a bug?
>
> It couldn't nor shouldn't possibly be anything else. \keepWithTag works
> on the results of the \relative music function call, so obviously
> \relative is evaluated before \keepWithTag is being evaluated.
>
> --
> David Kastrup

Reply via email to