Home Programmierung How to set up your Lisp System with Emacs, CCL, SLIME and Quicklisp on Windows

Main Menu

Home
Veröffentlichungen
Texte / Essays
Programmierung
------------------
Kontakt
Impressum
Datenschutz
------------------
How to set up your Lisp System with Emacs, CCL, SLIME and Quicklisp on Windows

There are probably other How-To Documents on this subject; but as I had to install a system on a new PC, I took the opportunity to write this little How-To:

Written by Sebastian Glas

(Tested on Windows 10, December 2015)

 

1) Install Emacs

Download and extract Emacs to a dir with sufficient privileges

(eg from https://ftp.gnu.org/gnu/emacs/windows/ , eg. to <userhome>\bin\emacs-24.5)

Test: start runemacs.exe

 

2) Download CCL Lisp from http://ccl.clozure.com/download.html

Extract it to a dir with sufficient privileges (eg. to <userhome>\bin\ccl-1.11)

Test: wx86cl.exe (and/or wx86cl64.exe) should run

 

3) Download slime https://github.com/slime/slime/releases

and extract it again, eg <userhome>\bin\slime-2.15

 

4) Create a batch file to setup Emacs home and to start Emacs:

eg. "<userhome>\bin\emacs-ccl.bat" containing:

@set HOME=<userhome>\bin\ccl-1.11

@<userhome>\bin\emacs-24.5\bin\runemacs.exe

 

Create a Desktop Shortcut for this Batch File, if you like.

 

5) Start the batch file. Emacs should create a .emacs.d directory in your CCL Lisp Directory

 

6) Change to the <userhome>\bin\ccl-1.11\.emacs.d\ directory and create the file "init.el":

Make sure you use slashes "/" instead of backslashes "\" for path names.

 

---begin---

(setq inhibit-startup-message t)

(set-language-environment "utf-8")

(global-linum-mode t)

(show-paren-mode 1)

(add-to-list 'load-path "<userhome>/bin/slime-2.15/>")

(setq inferior-lisp-program "<userhome>/bin/ccl-1.11/wx86cl.exe -K utf-8")

(require 'slime)

(setq slime-net-coding-system 'utf-8-unix)

(slime-setup '(slime-fancy))

(prefer-coding-system 'utf-8)

(set-terminal-coding-system 'utf-8)

(setq default-buffer-file-coding-system 'utf-8)

(slime)

---end---

 

7) re-start the batch file to start emacs

Test: Slime should start with a CCL Lisp connection.

 

8) Download Quicklisp and save it in your CCL Directory

https://beta.quicklisp.org/quicklisp.lisp

 

9) Assuming your Emacs & Lisp are still running (otherwise start your Batch File to run it):

At the LISP REPL, CL-USER>, enter:

(load "<ccl lisp dir>/quicklisp.lisp")

 

It should load. Then enter

(quicklisp-quickstart:install)

 

--> Quicklisp requires Internet access to download libraries.

Make sure access is possible. It should download Quicklisp files.

 

As a last step, at the REPL enter

(ql:add-to-init-file)

 

Quit Emacs and re-start it via your batch file. Quicklisp should be loaded.

Test: You can check this by entering "(Quick" at the REPL and pressing the Tab Key, autocompletion should find something.

 

10) Assuming you want to keep your own Lisp Files in the Quicklisp "Local-Projects" Folder:

Edit your Batch starter file, and add as the first line:

@cd C:\Users\<username>\quicklisp\local-projects\

(assuming that this is your user directory)

This way, your default loading directory is set to local-projects, when you press Ctrl-x-f to open files.

 

Test: Re-start Emacs: The folder for loading files should be "local-projects"

 

Optional: To load a certain file into an Emacs buffer after start-up of Emacs, edit init.el add before the (slime) command:

(find-file "<path/and/filename>")