I am trying to load a file in Lisp from a file in the same directory using a relative path.
My file structure looks like this:
repo/
subdir/
main.lisp
test.lisp
In main.lisp
I have a number of function definitions, and in test.lisp
I want to test the functions.
I have tried using (load "main.lisp")
and (load "main")
in test.lisp
, as well as a number of variations on the pathname (i.e., including ./
before the filename) but both times I get the following error (where <filename>
is the filename passed to the load function):
File-error in function LISP::INTERNAL-LOAD: "<filename>" does not exist.
Is it possible to load main.lisp
using a relative path?
It may be worth noting that I am running CMUCL and executing the code using SublimeREPL inside of Sublime Text 3.
*load-truename*
wasnil
. However, it did work when I used(load "path-to-test.lisp")
. – Hodden