lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Text listing output in .txt file


From: David Kastrup
Subject: Re: Text listing output in .txt file
Date: Wed, 02 Aug 2017 21:35:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Jan-Peter Voigt <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]