On Mon, Apr 27, 2015 at 04:44:52PM +0200, Urs Liska wrote: > > What we have in Frescobaldi depends on what we can "catch" by either > listening through engravers or by redefining command. So far I haven't > found a notion of a grob knowing if it has been tweaked or not.
As a Scheme/Lilypond novice sitting on the sidelines, I have a difficult time judging whether my comments are obvious, stupid, trival, useless, impractical, or some exquisite combination of all five, but .... (oh, and there's "poorly thought-out") If the grob doesn't know whether it's been tweaked, then perhaps \tweak could do it? Or, perhaps one could create a wrapper directive \ctweak which invokes \tweak to perform the specific tweak that was requested, and then \ctweak could also color the grob that got tweaked? Having to change one's code from tweak to ctweak and back may be less than ideal. Perhaps a global variable (ugh) could be used by \ctweak, defaulting to black, so that by default \tweak and \ctweak are equivalent, except that a user of \ctweak could alter the global color variable to something other than black, resulting in all the \ctweaks appearing in that color. I can't think offhand how to extend this to support users who use a color other than black as the base color for engraved grobs, or for how to show tweaked grobs which already use \ctweak's global tweak color. But if \tweak is defined in terms of Scheme/Guile code (I'm ignorant on that point), perhaps a Scheme guru can write a first-order approximation of \ctweak that could be included in any project's source code where it is desired. A deeper change might be to add a property to all grobs that contains a tweak-count, initialized to 0. \tweak would increment the count of each grob it touches, and then the grobs would know whether they've been tweaked or not. Pretty sure this is the "obvious" option in paragraph 1. _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user