From: Pascal J. B. <pj...@in...> - 2011-11-01 02:59:36
|
"Fernando L. Canizo" <co...@lu...> writes: > On Mon, 31 Oct 2011 22:56:44 +0100, "Pascal J. Bourguignon" > <pj...@in...> wrote: > >> Anton Vodonosov <avo...@ya...> writes: >> >> > Is it possible to have some init file for CLISP which is executed >> >> clisp -q -norc -ansi >> (load "quicklisp/setup.lisp") >> (ext:save-init-mem "~/bin/ql-clisp" :executable t) >> (ext:quit) >> >> and now on use ~/bin/ql-clisp instead of clisp. >> >> Not tested, it may not work. Notably, quicklisp/setup.lisp probably >> hard-wires pathnames, so it probably won't work if launched from >> another account. > > I tried it verbatim and it didn't worked, it seems in my installation > ext:save-init-mem is mapped to saveinitmem, in fact I have no package > EXT. No, it's me, I didn't try and didn't remember that saveinitmem is a word in clisp ;-) Sorry about that. > But I made it work like this: > > $ clisp -q -norc -ansi > ;; this is suggested configuration for rc file by quicklisp docs > (let ((quicklisp-init (merge-pathnames > "quicklisp/setup.lisp" (user-homedir-pathname)))) > (when (probe-file quicklisp-init) > (load quicklisp-init))) > (saveinitmem "~/bin/ql-clisp" :executable t) > (quit) Now that I think about it, if quicklisp hardwires pathnames, then you could instead load it when you load the image by setting a init function: clisp -q -norc -ansi ;; No change to the original image, but: (ext:saveinitmem "~/bin/ql-clisp" :executable t :init-function (lambda () (let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))) (when (probe-file quicklisp-init) (load quicklisp-init))))) Also, for global scripts, you could install quicklisp in a global location and use it instead of a user specific quicklisp installation. -- __Pascal Bourguignon__ http://www.informatimago.com/ A bad day in () is better than a good day in {}. |