Orm Finnendahl <[email protected]> writes: > Am Sonntag, den 15. Juni 2014 um 14:26:36 Uhr (+0200) schrieb David Kastrup: >> Orm Finnendahl <[email protected]> writes: >> Would you have preferred >> >> orm.ly:11:20: error: music function cannot return \markup \line { "Test"} > > that doesn't really matter, the problem for me was, whether the error > message meant "music function can't return (at all)" or whether it > meant "can't return a procedure (or whatever)", but that is clear now. > > However it is not yet clear to me, what actually is expected in which > context. IIUC, the respective part in the manual is 2.3.2 and it says: > > "Music functions may currently be used in several places. Depending on > where they are used, restrictions apply in order to be able to parse > them unambiguously. The result a music function returns must be > compatible with the context in which it is called."
A music function has to return music, period. Different music may be used in different contexts, but a music function cannot return anything but music. If you want to return something else, use a scheme function. > - What is "compatible with the context in which it is called"? > > - How can I find out what defines a certain context and what return > values lilypond expects or finds acceptable in that situation? > > - Is "\markup" in its most general form even representable by a music > function? No. Markup is not music. -- David Kastrup _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
