-
Notifications
You must be signed in to change notification settings - Fork 1
TODO
The plan is to build a lilypond-invoke-editor
script that will be smart enough to open the correct source file and point to the right place.
Solution:
1. Insert special comments into the generated .ly file, something that looks like this:
% ~/music/BWV17/01-kyrie/soprano.rpl %
…
%%
(The empty %%
line signifies the end of the source include.)
2. The lilypond-invoke-editor
script should open the file referred to by Lilypond at the correct position, and then look backwards for a %% comment. Once such comment is found, the included file is opened and the position within it is calculated.
On Mac OSX there’s some magic involved: the Lilypond app includes the following definition in it’s info.plist
file:
<key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleTypeRole</key> <string>Editor</string> <key>CFBundleURLName</key> <string>text editor via url</string> <key>CFBundleURLSchemes</key> <array> <string>textedit</string> </array> <key>NSDocumentClass</key> <string>TinyTinyDocument</string> </dict> </array>
What we need to do is to create another application that will define the textedit
URL scheme and then invoke our script. Another option is to see if we can hack on the original Lilypond Mac app.