https://lists.gnu.org/archive/html/bug-lilypond/2018-08/msg00000.html
After installation, there are two lilypond-invoke-editor files:
/usr/local/bin/lilypond-invoke-editor
/usr/local/lilypond/usr/bin/lilypond-invoke-editor
The first is a simple script that sets some environment and invokes the LilyPond version of Guile with the second file, which is the actual Scheme program. The script uses the -e main option which causes Guile to invoke the named function; however, there is already an explicit invocation of main at the end of the Scheme program. This results in the functionality running twice.
I suppose that, depending on how you have your EDITOR or LYEDITOR variables configured, you might not notice a double launch; but I was certainly confused at first why I was getting repeated behavior.
I added the GUB label, since this is a GUB issue, if we want to remove
-e mainfrom the wrapper file, which is set here:https://github.com/gperciva/gub/blob/master/sourcefiles/lilypond-sharhead.sh#L228
${callmain} should be removed, I guess.
If you read the shell script, you'll see that
${callmain}is empty for all python files and expands to-e mainonly for guile scripts, which is only lilypond-invoke-editor. Removing it seems safe.lilypond-invoke-editor should not be called twice
LilyPond issue #5396:
https://sourceforge.net/p/testlilyissues/issues/5396/
http://codereview.appspot.com/363790043
Here's the PR on Github:
https://github.com/gperciva/gub/pull/48
I cannot test this in the normal way. Putting his on Review hoping others with more knowledge are OK with this.
Looks like this has been merged.
Should have been fixed with my merge today.