Thomas Morley <thomasmorle...@gmail.com> writes:

> Hi,
>
> consider the following two snippets:
>
> \version "2.19.44"
>
> \new ChordNames
>   \chordmode {
>    \applyOutput ChordNames.ChordName
>      #(lambda (g ctx p)
>        (write-me "\ng" g)
>        (write-me "ctx" ctx)
>        (write-me "p" p)
>        )
>     c
>   }
>
> \new Lyrics
>   \lyricmode {
>    \applyOutput Lyrics.LyricText
>      #(lambda (g ctx p)
>        (write-me "\ng" g)
>        (write-me "ctx" ctx)
>        (write-me "p" p)
>        )
>     foo
>   }
>
> I get terminal-output as requested from the first example but none
> from the second.
>
> Am I doing something wrong?
> Is there a limitation I'm not aware?
> Or simply a bug?

Well, call it what you want...

\version "2.19.44"

\new ChordNames
  \chordmode {
   \applyOutput ChordNames.ChordName
     #(lambda (g ctx p)
       (write-me "\ng" g)
       (write-me "ctx" ctx)
       (write-me "p" p)
       )
    c
  }

\new Lyrics \with { \consists "Output_property_engraver" }
  \lyricmode {
   \applyOutput Lyrics.LyricText
     #(lambda (g ctx p)
       (write-me "\ng" g)
       (write-me "ctx" ctx)
       (write-me "p" p)
       )
    foo
  }
Two possible ways to fix this:

1) add the Output_property_engraver on all possibly interesting
Bottom(?) contexts
2) Move the Output_property_engraver to Score level only and change it
so that it sends the respective grob starting from the originating
engraver context to the first (all?) context in the parentage of that
context that matches the alias.

The second solution is more work but also more likely to work as
expected without further thinking.

-- 
David Kastrup
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to