Allow defining *QUICKLISP-HOME* in the REPL.#28
Conversation
Allows users to define *QUICKLISP-HOME* in the REPL before loading ql-setup.lisp; which makes it easier to install it to a different directory.
| ;; and contains the call to setup. | ||
|
|
||
| (in-package #:common-lisp-user) | ||
| (export '*quicklisp-home*) |
There was a problem hiding this comment.
This is unnecessary and can be removed. The *quicklisp-home* symbol must not be exported to be accessed.
| (defvar *quicklisp-home* | ||
| (make-pathname :name nil :type nil | ||
| :defaults (let ((qlhome "~/quicklisp/")) | ||
| (when (boundp 'cl-user:*quicklisp-home*) |
There was a problem hiding this comment.
Use :: to access unexported symbols: cl-user::*quicklisp-home*
There was a problem hiding this comment.
Didn't know that, interesting. I don't know how I feel about being able to access internal symbols, but in this case it'd be useful.
|
Thank you for your submission! Unfortunately, I don't fully understand the purpose of this change? Can you elaborate your workflow? Especially, why do you need to change the value of I assume this is more a configuration issue. Usually you add this code to your lisp's init file: (let ((quicklisp-init #p"~/common-lisp/ql-https/ql-setup.lisp"))
(when (probe-file quicklisp-init)
(load quicklisp-init)
(asdf:load-system "ql-https")
(uiop:symbol-call :quicklisp :setup)))If you want to change quicklisp's install location, you need the change (let ((quicklisp-init #p"~/common-lisp/ql-https/ql-setup.lisp"))
(when (probe-file quicklisp-init)
(load quicklisp-init)
(setf ql-setup:*quicklisp-home* #p"/path/to/quicklisp/") <-- here
(asdf:load-system "ql-https")
(uiop:symbol-call :quicklisp :setup)))The last 4 lines of the code snippet above can also be used in the REPL (without the |
|
My use case is I want to use a custom Quicklisp home directory (so I don't need to have a Quicklisp directory in my home directory) and I want to use ql-https from my initfile (.sbclrc). If I load ql-setup as it is then it errors because it wants to load Quicklisp from $HOME/quicklisp. Having that happen when I want to use SBCL non-interactively to run a script is annoying. Currently I'm working around it by defining the ql-https package in my init file and setting quicklisp-home before loading ql-setup, but being able to define quicklisp-home in the cl-user package and having it autoload from there would be more convenient. |
…ge even if it is not exported.
|
I guess the better option would be to defer the path verification from the variable definition to wherever |
|
This can be closed in favour of #29 |
Allows users to define QUICKLISP-HOME in the REPL before loading ql-setup.lisp; which makes it easier to install it to a different directory.