2017-08-02 21:35 GMT+02:00 David Kastrup <d...@gnu.org>: > Jan-Peter Voigt <jp.vo...@gmx.de> writes: > >> Hi Daniel and all others, >> >> you wrote about a critrical edition. There is scholarly: >> https://github.com/openlilylib/scholarly >> where you can add annotations to your score which then can be collected in >> another file. >> If you want to use the EE for tracking, you might use \applyContext >> #(lambda (context) ... ) . >> Of course you can use this function right inside your code. >> >> I am not at my computer right now, so I can not provide an example >> (yet). But perhaps someone else can make use of this idea. > > \applyContext is called at the time music is interpreted (usually quite > remote from the text entry). At that point, (*location*) tends to point > to something nonsensical, and the execution of \applyContext's function > does not pass a pointer to the originating music expression (where the > origin would be recorded). > > So one needs to call (*location*) in a wrapper function that then uses > the result in a closure passed to applyContext. _If_ one goes the > applyContext route, that is. > > Another option would be to have applyContext fetch the origin and make > it available in the %location fluid. That seems a bit wasteful but > likely would not result in noticeable performance impacts. > > -- > David Kastrup
I had sent my previous mail before reading your reply here. Having taken the applyContext-approach, I see no drawbacks currently. Needs more testing, ofc Cheers, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user