Thank you for the very prompt response. I had tried popen, but with no
luck. I will give it another go.I do not now remember what it originally
said, if anything.
[Later] The error I am getting now is:
Processing `/tmp/frescobaldi-duowk0s5/tmpz726e77a/testGit.ly'
Parsing...fatal: not a git repository (or any of the parent
directories): .git
So, after a bit of faffing around for how to change the TMPDIR in the
GUI, I changed my whisker-menu (Ubuntu/xfce4) entry to
bash -c "TMPDIR=$HOME/src/Music/tmp frescobaldi %F"
Doing just
TMPDIR=$HOME/src/Music/tmp frescobaldi %F
did not work.
On 15/12/2023 13:25, Jean Abou Samra wrote:
I keep my Lilypond files in a git repository. I would like to
interpolate the repo's version number in the Lilypond output by
running a command like "git log|head -1". I can do this from raw
Scheme using the system() function, but this does not seem to work in
Lilypond.
How does it fail? It should definitely work. It will just not capture
the output. See LSR 567 <https://lsr.di.unimi.it/LSR/Item?id=567> for a
snippet that uses |open-pipe*| from |(ice-9 popen)| to achive
essentially the same need as yours.
I realise that being able to do so opens up a massive security hole,
but that is not a problem here.
LilyPond does not attempt to securely compile the file if it untrusted.
(There used to exist a |-dsafe| option, but it was found to be
irreparably broken, and got removed.)
--
In software design, perfection has been reached not when there
is nothing left to add, but when there is nothing left to take
away. - After RFC1925