What is the general Lisp environment to use on a Mac?
What general Lisp environment are you using? I'm just starting out with the book "Practical General" Lisp by Peter Seibel (he can also read online at http://www.gigamonkeys.com/book/ ) and the Lisp book in a box ( http://common-lisp.net/project / lispbox / ).
However, it has not been updated since 2011, and the prevalent version of Emacs is quite old (23.2.1). So I updated the Emacs version to 24.3.1 using the distribution provided at http://emacsformacosx.com . It has the best Mac OS X integration.
To upgrade your version of Emacs, follow these steps:
- Download and install lispbox 0.7
- Download Emacs for Mac OSX 24.3.1
- In lispbox-0.7, I'll rename Emacs.app to Emacs.old.app
- Copy Emacs.app from the Mac OS X Emacs distribution to lispbox-0.7 /
- Copy Emacs.app.old / MacOSX / lispbox.sh to Emacs.app/MacOSX . Council. If you are using Finder, select "Show Package Contents"
- Copy Emacs.old.app/Resources/site- lisp / lispbox.el to Emacs.app/Resources/site- lisp 7. Then edit Emacs.app/Contents/MacOS/lispbox.sh as shown below.
lispbox.sh
#!/bin/bash
if [ "${0:0:2}" = "./" ]; then
export LISPBOX_HOME=`pwd`/../../..
else
export LISPBOX_HOME=`dirname $0`/../../..
fi
export SBCL_HOME=${LISPBOX_HOME}/sbcl-1.0.42/lib/sbcl
#exec ${LISPBOX_HOME}/Emacs.app/Contents/MacOS/Emacs --no-init-file --no-site-file --eval='(progn (load "lispbox") (slime))'
exec ${LISPBOX_HOME}/Emacs.app/Contents/MacOS/Emacs-10.7 --no-site-file --eval='(progn (load "lispbox") (slime))'
Then you can start Emacs with a Lisp environment by running lispbox.sh
Note that I changed the editor and I removed the -no-init-file option to make sure ~ / .emacs is read. To still be able to use Lisp in the Box version of Emacs, you can edit Emacs.app/Contents/MacOS/lispbox.sh to use * Emacs.old.app/Contents/MacOS/Emac * s
However, this is how I installed a common Lisp environment on my Mac. I am wondering if there are less cumbersome paths.
source to share
Here's how to set up your environment with Emacs, SBCL, and SLIME from scratch using the latest files currently available.
-
Install Emacs from http://emacsformacosx.com (Emacs version 24.3)
-
Install SBCL 1.1.8 from http://www.sbcl.org/platform-table.html to a directory of your choice (for example
~/sbcl/
)$ tar xjvf sbcl-1.1.8-x86-64-darwin-binary.tar.bz2 $ cd sbcl-1.1.8-x86-64-darwin $ INSTALL_ROOT=~/sbcl/ sh install.sh
-
Install Quicklisp from http://www.quicklisp.org/beta/ and then install SLIME using Quicklisp
$ curl -O http://beta.quicklisp.org/quicklisp.lisp $ SBCL_HOME=~/sbcl/lib/sbcl ~/sbcl/bin/sbcl --load quicklisp.lisp # launch SBCL * (quicklisp-quickstart:install) ; complete Quicklisp installation * (ql:quickload "quicklisp-slime-helper") ; install SLIME * (ql:add-to-init-file) ; to load Quicklisp every time SBCL is started * (quit)
-
Create
~/.emacs
with these lines in it(setenv "SBCL_HOME" (expand-file-name "~/sbcl/lib/sbcl")) (setq inferior-lisp-program "~/sbcl/bin/sbcl") (load (expand-file-name "~/quicklisp/slime-helper.el"))
-
Start Emacs and invoke SLIME using
M-x slime
source to share