On Sat 10 Mar 2018 at 09:18:59 (+0100), Federico Bruni wrote: > Hi folks > > I'm puzzled by this error. What I'm doing wrong? > > [tmp]$ mkdir pdf > [tmp]$ cat test.ly > \version "2.18.2" > > { c1 } > > [tmp]$ ls pdf > [tmp]$ > [tmp]$ lilypond --output=pdf test.ly > GNU LilyPond 2.19.81 > Changing working directory to: `pdf' > Processing `test.ly' > Parsing... > /usr/share/lilypond/2.19.81/ly/init.ly:43:1: error: cannot find > file: `test.ly' > (search path: > `/tmp:/usr/share/lilypond/2.19.81/fonts/svg/:/usr/share/lilypond/2.19.81/fonts/type1/:/usr/share/lilypond/2.19.81/fonts/otf/:/usr/share/lilypond/2.19.81/scm:/usr/share/lilypond/2.19.81/ps:/usr/share/lilypond/2.19.81/ly:') > > \maininput > test.ly:1: warning: no \version statement found, please add > > \version "2.19.81" > > for future compatibility > fatal error: failed files: "test.ly" > [tmp]$ > [tmp]$ > [tmp]$ ls -l pdf > total 0 > > > Why it's changing working directory to pdf before running test.ly?
So that LP's output ends up there. I do that in my own lily function, only I remember to keep hold of the source file's path BEFORE I go there. Here it appears not to. > The documentation in Usage 1,2 is pretty clear: > > -o, --output=FILE or FOLDER I don't recognise this. What is Usage 1,2? > Set the default output file to FILE or, if a folder with that > name exists, direct the output to FOLDER, taking the file name from > the input file. The appropriate suffix will be added (e.g. .pdf for > pdf) in both cases. /home/david/lilypond-docs/2.19.80/man1/lilypond.1 3287/3451 95% -o, --output=FILE write output to FILE (suffix will be added) Perhaps the documentation is running ahead of the program's capabilities? A workaround is to give the full path of test.ly to LP, ie /tmp/test.ly. Cheers, David. _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user