Quoth Han-Wen Nienhuys:
> Don Blaheta wrote:
> > 2) Is there a Scheme function to retrieve the _current_ context? It
> > looks like all the functions require a context as an argument.
>
> What do you mean by "current" ? Where do you need it ?
The context that is enclosing the point where the Scheme function is
called. I guess it's probably in the location variable that is the
second argument to a music-function, but I'm not sure how to access it
from there.
I'm actually particularly interested in getting the id of the current
context, so I can store it in a variable and use the value of that
variable later. I've also been having trouble typing in such an id
literally; if I define a music function like
foo = #(def-music-function (parser location str) (string?)
#{ \context Voice = $str { \override NoteHead #'font-size = #3 }
#})
and then include in my code
\foo "blah"
I get an error
funcs.ly:26:14: error: syntax error, unexpected STRING, expecting SCM_T or
SCM_IDENTIFIER
\foo "blah
"
error: errors found, ignoring music expression
I can't figure out how to convert between Scheme strings and the
lilypond-native things that look like strings but seem to be something
else (often a LYRICS_STRING, though not in this case).
(Again, all on 2.6.4 on MacOS.)
--
-=-Don [EMAIL PROTECTED]<http://www.blahedo.org/>-=-
The streets are safe in Philadelphia. It's only the people who make them
unsafe. --Frank Rizzo, ex-police chief and mayor of Philadelphia
_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user