Re: Getting the name of the context a scheme function was called from

2013-01-12 Thread Paul Morris
On Jan 12, 2013, at 10:42 AM, Marc Hohl wrote: > Would the use of tags be helpful here? > > http://lilypond.org/doc/v2.16/Documentation/notation/different-editions-from-one-source#using-tags Thanks Marc! Tags are just the tool for the job, and I wasn't aware of them before. I can tag the ove

Re: Getting the name of the context a scheme function was called from

2013-01-12 Thread Marc Hohl
Am 12.01.2013 16:28, schrieb Paul Morris: On Jan 12, 2013, at 2:47 AM, David Kastrup wrote: Uh, if you have a _custom_ staff context for which you want particular overrides, you just do \layout { \context { \Staff \name "MyStaff" \alias "Staff" \override ... \override ..

Re: Getting the name of the context a scheme function was called from

2013-01-12 Thread Paul Morris
On Jan 12, 2013, at 2:47 AM, David Kastrup wrote: > Uh, if you have a _custom_ staff context for which you want particular > overrides, you just do > > \layout { > \context { >\Staff >\name "MyStaff" >\alias "Staff" >\override ... >\override ... > } > } > > at the bottom,

Re: Getting the name of the context a scheme function was called from

2013-01-11 Thread David Kastrup
Paul Morris writes: > On Jan 11, 2013, at 12:40 PM, David Kastrup wrote: > >>> But to do that I need the "translator object" (which seems to be an >>> engraver?), and I'm not sure how to do that. Maybe there is a way to >>> get to it from the grob? >> >> A grob can be announced in multiple con

Re: Getting the name of the context a scheme function was called from

2013-01-11 Thread Paul Morris
On Jan 11, 2013, at 12:40 PM, David Kastrup wrote: >> But to do that I need the "translator object" (which seems to be an >> engraver?), and I'm not sure how to do that. Maybe there is a way to >> get to it from the grob? > > A grob can be announced in multiple contexts, so no. Ok, thanks. >

Re: Getting the name of the context a scheme function was called from

2013-01-11 Thread David Kastrup
Paul Morris writes: > given custom staff context, but do nothing when it is called from a > standard staff context. Then I could put the music, with calls to the > function, into a variable, and use that variable in both custom and > standard staves. When called from the custom staff the functi

Getting the name of the context a scheme function was called from

2013-01-11 Thread Paul Morris
Hello everyone, Here's an obscure scheme function question: how do you get the name of the context that a scheme function was called from, from within that function? Assuming this is possible... I would like to write a scheme function that will do something (override horizontal placement o