On 28/07/2012 07:32, David Kastrup wrote: > Reinhold Kainhofer <reinh...@kainhofer.com> writes: > >> The text spanner implemented in scheme (which is also used as a basis >> for David's measure counter engraver) seems to work fine in the regtest, >> but apparently it is not quote-proof. >> >> In particular, if you try call \addQuote on some music that contains >> \schemeTextSpannerStart or \schemeTextSpannerEnd, then you get the >> following warnings and the text spanner is not quoted: > Well, scheme-text-spanner changes the \Global context, and quote > environments uses the layout definition partCombineListener in > ly/declarations-init.ly with an unchanged Global context. > > Change its Global context similarly, and you should be set.
How can a user, who wants to use e.g. the measure counter engraver, change the partCombineListener' s Global context without messing with the original lilypond sources? Am I missing something? The whole point of scheme engravers and scheme text spanners is that users can now also implement things in scheme without messing with the lilypond sources... If I understand you right, then the user cannot add new grobs in an include file without messing with the lilypond sources. Would a proper solution be to change the partCombineListener to a context mod and construct the real listener when we need it (i.e. replace the current (ly:parser-lookup parser 'partCombineListener) by the actual creation of the listener from the context in effect when add-quotable or recording-group-emulate is called? However, I don't really have enough knowledge about how to create the actual listener in scheme and insert a given context mod in scheme... Cheers, Reinhold -- ------------------------------------------------------------------ Reinhold Kainhofer, reinh...@kainhofer.com, http://www.kainhofer.com * Financial & Actuarial Math., Vienna Univ. of Technology, Austria * http://www.fam.tuwien.ac.at/, DVR: 0005886 * Edition Kainhofer, Music Publisher, http://www.edition-kainhofer.com _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel