unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Thomas Morley <thomasmorley65@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guile-user@gnu.org
Subject: Re: What's up with 'current-load-port'
Date: Tue, 6 Nov 2018 00:37:21 +0100	[thread overview]
Message-ID: <CABsfGyWNxUxOf9Z7zy8pYCJ2gyChhRBPTnc2WT_Sv2qr1-3QTA@mail.gmail.com> (raw)
In-Reply-To: <87woprzv90.fsf@gnu.org>

Am Mo., 5. Nov. 2018 um 11:38 Uhr schrieb Ludovic Courtès <ludo@gnu.org>:
>
> Hi Thomas,
>
> Thomas Morley <thomasmorley65@gmail.com> 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	other threads:[~2018-11-05 23:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-04 11:55 What's up with 'current-load-port' Thomas Morley
2018-11-04 12:50 ` Alex Vong
2018-11-04 13:14   ` Thomas Morley
2018-11-06 20:25     ` Alex Vong
2018-11-05  1:43 ` Mark H Weaver
2018-11-05  8:25   ` Thomas Morley
2018-11-05  9:49     ` Thomas Morley
2018-11-05 10:14     ` Ludovic Courtès
2018-11-05 23:37       ` Thomas Morley [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABsfGyWNxUxOf9Z7zy8pYCJ2gyChhRBPTnc2WT_Sv2qr1-3QTA@mail.gmail.com \
    --to=thomasmorley65@gmail.com \
    --cc=guile-user@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).