* 2012-10-22 04:44 +0200 Ian Hulin:
> On 21/10/12 22:00, Reedmace Star wrote:
> > --- file my-scheme-defs.scm (same directory as master.ly) ---
> > 
> > ;;; scheme definitions...
> > 
> > 
> > --- file master.ly ---
> > 
> > \version "2.16.0" #(load "my-scheme-defs.scm")
> > 
> > %% do something ...
> > 
> > ---
> > 
> > This, however, only works when calling lilypond on master.ly from
> > that same directory. The load command looks for the .scm file in
> > the present working directory, but not in the directory containing
> > the including file.
...
> 
> If my-scheme-defs.scm is in path my-scheme-dir
> 
>  --- file master.ly ---
> 
>  \version "2.16.0"
>  % allow guile to find your file.
>  #(set! %load-path cons("my-scheme-dir" %load-path))
>  #(load-from-path "my-scheme-defs.scm")
> 
>  %% do something ...

O.k., but that would require "my-scheme-dir" to be an absolute path, 
lest I run into the original problem, right?

To keep the project self-contained and movable, I would prefer to 
include relative to master.ly. Can I somehow find out its containing 
directory from inside that file?

Best regards,

Reedmace Star

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to