What would be wrong about just outputting a warning "Trying to include
already included file" or something like that and reject
the recursive \include statement?
I came across this when working with a include file collecting cue notes
like that:
\include "foo1.ly"
\include "foo2.ly"
\include "foo3.ly"
\addquote "bla1" { \foo1_bla1 }
\addquote "bla2" { \foo2_bla2 }
(...)
I change my code to circumvent the recursive loop but I needed a moment
to figure out why LilyPond was hanging.
A warning would be nice.
Honestly I did not try it, but I am quite sure that it would be easy to
implement a IFDEF mechanism like in C preprocessing with a few lines of
Scheme, however.
All the best,
Michael
Am 21.06.2017 um 22:03 schrieb msk...@ansuz.sooke.bc.ca:
On Wed, 21 Jun 2017, Michael Käppler wrote:
foo.ily:
\include "bar.ly"
bar.ly:
\include "foo.ily"
Am I right to consider this a bug?
I don't think so - at least not a bug in Lilypond. It's just doing what
you told it to do, and most other language parsers that have an "include"
facility will similarly be unable to give a useful result when fed
infinitely recursive include files. The usual advice to users is not to
write such input.
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user