lilypond-devel
[Top][All Lists]
Advanced

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

Re: Set indent based on instrument name (issue 6457049)


From: David Kastrup
Subject: Re: Set indent based on instrument name (issue 6457049)
Date: Tue, 31 Jul 2012 14:14:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

"Phil Holmes" <address@hidden> writes:

>>> Question is - is it OK to modify my code to use statics,
>>
>> No.  Even engravers at score level are running in parallel, like when
>> using a \score markup or using the part combiner or quoting music and so
>> on.  Static variables just don't work in this setting.
>
> I'm sure that's not a problem here - the instrument name engraver
> finishes its work before the output-def indent code is called at all,
> so the name engraver "corrects" the indent before it's ever used.

If every name itself is a score, you'll trash your global variables
before all names have been typeset.

And if you think this is purely hypothetical, check out
Documentation/snippets/incipit.ly.

There are exceptions to every rule.  But if you are calling for an
exception because you lack the skills for following the rule, it is
unlikely that your skills are sufficient for correctly identifying the
exception.

-- 
David Kastrup



reply via email to

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