While working through Peter Seibel's book Practical Common Lisp, I've had some difficulty understanding how to handle the Common Lisp package system in conjunction with Emacs's SLIME and quicklisp. The project he supplies has the following structure:
spam.lisp
in the packagecom.gigamonkeys.spam
, which relies on two other packages,cl-ppcre
andcom.gigamonkeys.pathnames
.pathnames.lisp
in the packagecom.gigamonkeys.pathnames
spam.asd
, which describes the dependencies ofcom.gigamonkeys.spam
packagepathnames.asd
, which describes the dependencies of thecom.gigamonkeys.pathnames
package
The only way that I've currently found to build the final target, spam.lisp, is to:
- Compile and load the
pathnames.asd
file using SLIME (C-x C-k
) - Load the
com.gigamonkeys.pathname
package by typing(asdf:operate 'asdf:load-op 'spam)
at the REPL - Load the
cl-ppcre
package by typing(ql:quickload "cl-ppcre")
at the REPL - Compile and load the
spam.asd
file using SLIME - Load the
com.gigamonkeys.spam
package by typing(asdf:operate 'asdf:load-op 'spam)
at the REPL
This seems like an insane amount of work required to use the functions defined in a single file (spam.lisp
) - I've got to be doing something wrong. Is there some way to load spam.lisp
and, recursively, its dependencies, with fewer commands?