From: Dan Bensen
Subject: How do you set the load path?
Date: 
Message-ID: <f2d17q$7g4$1@wildfire.prairienet.org>
In sbcl, I want to add my personal lib directory to the path LOAD
looks in to find files.  Is there a way to do that in a [.]sbclrc
file or some other centralized place?  I tried this:
(setf *default-pathname-defaults*
	(merge-pathnames (pathname "/my/path/name/")
                          *default-pathname-defaults*))

but that replaced the current directory instead of adding to it.

-- 
Dan
www.prairienet.org/~dsb/

From: Zach Beane
Subject: Re: How do you set the load path?
Date: 
Message-ID: <m3abw57urw.fsf@unnamed.xach.com>
Dan Bensen <··········@cyberspace.net> writes:

> In sbcl, I want to add my personal lib directory to the path LOAD
> looks in to find files.  Is there a way to do that in a [.]sbclrc
> file or some other centralized place?  I tried this:
> (setf *default-pathname-defaults*
> 	(merge-pathnames (pathname "/my/path/name/")
>                           *default-pathname-defaults*))
> 
> but that replaced the current directory instead of adding to it.

*DEFAULT-PATHNAME-DEFAULTS* isn't a list, it's a single pathname. LOAD
doesn't search multiple directories.

For my personal projects, I always make ASDF files to load them, and
symlink the .asd files into ~/.sbcl/systems/. Then I can use REQUIRE.

Zach
From: Dan Bensen
Subject: Re: How do you set the load path?
Date: 
Message-ID: <f2d3tf$8di$1@wildfire.prairienet.org>
Zach Beane wrote:
> *DEFAULT-PATHNAME-DEFAULTS* isn't a list, it's a single pathname.

That's why I tried merge-pathnames instead of PUSH.  I thought it
might return something like #P"/my/path/name/;/path/to/current/dir/".

> For my personal projects, I always make ASDF files to load them, and
> symlink the .asd files into ~/.sbcl/systems/. Then I can use REQUIRE.

Thanks.  It looks like asdf:*central-registry* may work, but I wanted
to make sure there wasn't another way.

-- 
Dan
www.prairienet.org/~dsb/
From: Zach Beane
Subject: Re: How do you set the load path?
Date: 
Message-ID: <m3646t7sns.fsf@unnamed.xach.com>
Dan Bensen <··········@cyberspace.net> writes:

> Zach Beane wrote:
> > *DEFAULT-PATHNAME-DEFAULTS* isn't a list, it's a single pathname.
> 
> That's why I tried merge-pathnames instead of PUSH.  I thought it
> might return something like #P"/my/path/name/;/path/to/current/dir/".

MERGE-PATHNAMES takes a pathname with missing parts and copies the
parts from another pathname to fill it out as much as possible. The
resulting single pathname is a merger of two pathnames into one, not
two pathnames into two or more.

Zach