lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Relative includes, regtests, Scheme and lp parser.


From: Valentin Villenave
Subject: Relative includes, regtests, Scheme and lp parser.
Date: Thu, 18 Mar 2010 16:08:44 +0100

Hi Joe, greetings everybody,

While working on the regtests I've been wondering if we'd need a
regtest for the (awesome) behavior that Joe implemented in December
2008 (commit 644008f18ec6780a812eee09ca549cf6b929037c requested by
issue #391).

I'm not sure *how* this regtest could work (though I suspect it would
require embedded system commands, to create subdirectories and .ly
files, then delete them afterwards -- not sure it's worth the
trouble).

While messing with it, I stumbled upon a nice (undocumented AFAICS)
feature: relative-includes doesn't actually replace, but merely
overrides the standard behavior: if a file isn't found using the
relative filepath, then the same path is browsed from the primary .ly
file. Joe, can you confirm that?

Another question occurred to me: it seems that relative includes only
work in "pure" LilyPond mode. When embedding the \include command
inside a Scheme expression, e.g.

 (ly:parser-parse-string parser "\\include \"mysubdir/foobar.ly\""))

then it can only take into account the location of the primary entry
.ly file (in other words, the non-relative path). Is that so?


The attached tarball aims to demonstrate these oddities.

Thanks for your comments.

Valentin

Attachment: dir.tar.gz
Description: GNU Zip compressed data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]