Am Mo., 5. Nov. 2018 um 11:38 Uhr schrieb Ludovic Courtès <[email protected]>:
>
> Hi Thomas,
>
> Thomas Morley <[email protected]> skribis:
>
> > Recently a user wrote a large scm-file and put it into lilypond using
> > '(load file.scm)'.
> > No problem with guilev1, but with guilev2 'file.scm' is not found.
>
> In Guile 2.x, there’s a compilation step that did not exist in 1.8, so
> the question of how to resolve relative file names passed to ‘load’
> becomes trickier.
>
> What Guile 2.x does is that ‘load’ is now a macro that attempts to
> resolve file names relative to the location of the *source* file.  So if
> you have a.scm and b.scm in the same directory, and a.scm does:
>
>   (load "./b.scm")
>
> then b.scm is searched for in the same directory as a.scm.
>
> Of course if you use an absolute file name, that logic doesn’t come into
> play.
>
> I would recommend using modules to the extent possible, or using things
> like:
>
>   (search-path %load-path "file.scm")
>
> when you want to search for a file at run time.
>
> HTH!
>
> Ludo’.

Hi Ludo,

thanks for all the hints.
Not sure I can work on it before next weekend, though :(

Many thanks,
  Harm

Reply via email to