Bjørn Bäuchle <lilyb...@frankfurtium.de> writes: > Happy New Year! > > I have come across some odd behaviour with \pushToTag. > > See this MWE: > > x = \relative c' { \tag #'dyn c \tag #'dyn <c e>4 } > \relative c' { \pushToTag #'dyn \p \x } > > I receive the following message: > > test.ly:...: warning: \pushToTag cannot push post-event > \relative c' { \pushToTag #'dyn > \p \S } > test.ly:...: to this music > S = \relative c' { \tag #'dyn c > \tag #'dyn <c e>4 } > > Investigating, I found the error message in ly/music-functions.ly:1880. > This code has been introduced in > fda7efb2254751862897d66c6b27b099fb2975b6 ; the commit message says > "rhythmic events or articulations can be pushed to chords, and > articulations only can be pushed to rhythmic events." Now I don't quite > understand how articulations can be pushed to chords and then only to > rhythmic events, but in any case passing a chord into add-left which is > defined in lines 1874-1909 triggers the first condition "(music-is-of- > type? m 'simultaneous-music)" (line 1877). > > Changing the order of the conditions - first checking event-chord, then > sequential-music and simultaneous-music, i.e., moving lines 1884-1897 > above line 1876, works and allows to push a dynamic mark to an > EventChord.
Being the one responsible for the code, the reason for this was that I was completely unaware that an EventChord is not just of music type event-chord but also of simultaneous-music . That is kind of unexpected and I am surprised that it doesn't get us into more trouble. The question is whether that is useful to any degree. A quick scan sees simultaneous-music being checked for twice in ly/music-functions.ly (probably both instances from the commit you mention) and then in scm/auto-beam.scm and scm/modal-transforms.scm . The instance in auto-beam.scm is run on the output of event-chord-reduce and thus is unlikely to see any event-chord. The instance in modal-transforms.scm explicitly catches event-chord before simultaneous-music . I doubt either of those instances navigated that problem consciously. My vote would be to stop an event-chord from being marked as simultaneous-music. Neither are treated as events but are processed by individual iterators. And it does not look like this "feature" has been employed anywhere consciously. -- David Kastrup