Comment #24 on issue 1110 by d...@gnu.org: Wrong octave of repetition chord with \relative and #{ #} syntax
http://code.google.com/p/lilypond/issues/detail?id=1110
Come to think of it, the least invasive strategy might be hybrid: one does not try tracking the relation between q and the preceding chord at all but leaves it in the input side. \relative just throws away the existing contents of any q it encounters and replaces it by the chord it considers as the previous chord itself. If it has no such chord available, it keeps the current one and outputs a warning, like the input-based q would without a reference.
That way, q has predictable behavior and reference point both within and without \relative. Those are not the same, but given the more pathological cases discussed in the comments, we could not guarantee them to be the same, anyway.
The effort is pretty much the same as with tracking the relation to the previous chord: another layer of context-keeping (and/or another pass) for \relative.
_______________________________________________ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond