This is (hopefully) a continuation of a discussion on
music.stackexchange.com involving LilyPond and Frescobaldi and how
they handle include files. The question is here[1]. This is what the
user Kjara said in a reply to an answer of mine (ksnortum).
"If I have a file of a certain name X in the same folder as the file
that I'm compiling (and I'm NOT including X in the main file!), and I
use lilypond compiler, there is no problem at all. It just does not
matter that X is there. That is, in my opinion, the correct behaviour.
Frescobaldi on the other hand DOES care about the presence of X: It
simply does not compile. How can this not be a Frescobaldi issue?"
I was not able to reproduce this problem. Here's what I did:
1) I created a LilyPond file called
foo.ly containing this:
%%%
\version "2.22.1"
foo = { c' c' c' c' }
%%%
2) In the same directory, I created a LilyPond file
test-foo.ly that
contains this:
%%%
\version "2.22.1"
\include "
foo.ly"
\score {
\new Staff \foo
}
%%%
3) Whether I compiled this in Frescobaldi or at the command line with
LilyPond, there were no errors and a PDF file was created.
I may be misunderstanding the problem Kjara is describing. In the
original question, the file "X" was
init.ly. Now LilyPond contains a
file called that and if it is first in the include path, it causes an
error. I was able to avoid this by either a) giving a whole path name
to the local
init.ly file, or b) making sure the local
init.ly file
was first in the include path in Frescobaldi. But with
foo.ly, I saw
no problems.
1.
https://music.stackexchange.com/questions/117687/frescobaldi-does-not-create-files
--
Knute Snortum (ksnortum)