Hi Harm,
On Sun, Mar 16, 2014 at 7:06 AM, Thomas Morley <thomasmorle...@gmail.com>wrote: > 2014-03-12 1:27 GMT+01:00 Thomas Morley <thomasmorle...@gmail.com>: > > Hi, > > > > for some function I need to know the extent/length of the > AccidentalPlacement. > > > > With 2.16.2 I used to do something like: > > > > info = > > \override Staff.AccidentalPlacement #'after-line-breaking = > > #(lambda (grob) > > (display (interval-length (ly:grob-extent grob grob X))) > > (newline)) > > > > \relative c' { > > \info > > <c d> > > <cis d>1 > > <cis dis> > > <cis dis eis> > > <cis dis eis fis> > > <cis dis eis fis gis> > > } > > > > and got different values. > > > > With 2.18.0 and 2.19.1 it always returns the same: 1.1 > > Looks like a bug to me. > > How to do it different? > > > > Cheers, > > Harm > > Noone with an idea? Forgive the late reply... What about something like this? \version "2.19.3" info = \override Staff.AccidentalPlacement #'after-line-breaking = #(lambda (grob) (let* ((accs (map cadr (ly:grob-object grob 'accidental-grobs))) (sys (ly:grob-system grob)) (X-exts (map (lambda (x) (ly:grob-extent x sys X)) accs)) (un (reduce interval-union '() X-exts))) (display (interval-length un)) (newline))) \relative c' { \info <c d> <cis d>1 <cis dis> <cis dis eis> <cis dis eis fis> <cis dis eis fis gis> } --David _______________________________________________ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond