2011/12/26 Neil Puttock <n.putt...@gmail.com>: > > On 25 Dec 2011 23:01, "Thomas Morley" <thomasmorle...@googlemail.com> wrote: > >> I think there could be some difficulties to find the correct >> condition, when I create my own definitions/functions: >> >> \version "2.15.20" >> >> displayGrob = >> \once\override Stem #'after-line-breaking = >> #(lambda (grob) >> (let* ((beam (ly:grob-object grob 'beam)) >> (flag (ly:grob-object grob 'flag))) >> >> (begin >> (if (ly:grob? beam) >> (display "Yes") >> (display "No")) >> (newline) >> (if (ly:grob? flag) >> (display "Yes") >> (display "No")) >> (newline)))) >> >> { \displayGrob c'8[ d'] } >> >> I retrieve "Yes" in both cases. > > Filter out suicided grobs via grob::is-live? > > Cheers, > Neil
Just for the record. This works as expected: \version "2.15.20" displayGrob = \once\override Stem #'after-line-breaking = #(lambda (grob) (let* ((beam (ly:grob-object grob 'beam)) (flag? (grob::is-live? (ly:grob-object grob 'flag)))) (begin (if (ly:grob? beam) (display "Yes") (display "No")) (newline) (display flag?)))) { \displayGrob c'8[ d'] } So it's no bug! Many thanks, Harm _______________________________________________ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond