unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Alex Kost <alezost@gmail.com>
To: Tobin Harding <me@tobin.cc>
Cc: 23941@debbugs.gnu.org
Subject: bug#23941: load-path bug?
Date: Mon, 11 Jul 2016 11:18:43 +0300	[thread overview]
Message-ID: <87shvgpoyk.fsf@gmail.com> (raw)
In-Reply-To: <20160710231209.GA16159@eros.local> (Tobin Harding's message of "Mon, 11 Jul 2016 09:12:09 +1000")

Tobin Harding (2016-07-11 02:12 +0300) wrote:

> Guile does not appear to search %load-path when locating a file to load.
>
> From the documentation: https://www.gnu.org/software/guile/manual/html_node/Load-Paths.html

Right, and this page mentions 'load-from-path' :-)

> 6.17.7 Load Paths
> ...
> Variable: %load-path List of directories which should be searched for Scheme
> modules and libraries.
> ...
>
> Current environment:
>
> $ guile --version
> guile (GNU Guile) 2.1.3.11-d545e-dirty
> Copyright (C) 2016 Free Software Foundation, Inc.
>
> $ uname -a
> Linux eros 4.6.1-1-zen #1 ZEN SMP PREEMPT Thu Jun 2 13:29:40 UTC 2016 x86_64
> GNU/Linux
>
> $ ls ~/build/scheme 
> boot-9.scm  ggspec  test.scm
>
> scheme@(guile-user)> %load-path
> $1 = ("/home/tobin/build/scheme/" ...)
>
> scheme@(guile-user)> (load "test.scm")
> ;;; Stat of /home/tobin/test.scm failed:
> ;;; ERROR: In procedure stat: No such file or directory: "/home/tobin/test.scm"
> ERROR: In procedure primitive-load:
> ERROR: In procedure open-file: No such file or directory: "/home/tobin/test.scm"
>
> Is this something I am doing wrong?

You need to use the full file name for 'load'.  I think you want
'load-from-path'.

-- 
Alex





  reply	other threads:[~2016-07-11  8:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-10 23:12 bug#23941: load-path bug? Tobin Harding
2016-07-11  8:18 ` Alex Kost [this message]
2016-07-11 15:59   ` Andy Wingo

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=87shvgpoyk.fsf@gmail.com \
    --to=alezost@gmail.com \
    --cc=23941@debbugs.gnu.org \
    --cc=me@tobin.cc \
    /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).