[clbuild-devel] Newbie Confusion

Victor Kryukov victor.kryukov at gmail.com
Sun Feb 3 18:09:48 UTC 2008


On Feb 3, 2008 4:50 AM, David Lichteblau <david at lichteblau.com> wrote:
> Quoting Bryan Emrys (bryan.emrys at gmail.com):
> > 2. <Real newbie alert>Clbuild generates a core instance. While I can
> > run clbuild slime [project_name] and start editing, I'm not clear how
> > to that interacts with path names required by config files such as
> > when setting the path names for .emacs, slime, etc. I set up clbuild
> > as a directory under home. My interpretation of the clbuild file is to
> > set my .emacs file as
>
> You can usually run slime using
>   clbuild slime
>
> You shouldn't edit .emacs at all, unless you already have a .emacs that
> loads an different version of slime.  (In that case, remove anything
> related to slime from your .emacs before using "clbuild slime".)
>
> Of course, you -can- configure emacs manually to use the slime
> downloaded by clbuild, but first I'd recommend trying to get "clbuild
> slime" up and running.

Below is just one example how you can organize your .emacs etc.
(thanks to Bill Clementson, http://bc.tech.coop/blog/). I keep clbuild
under ~/src/clbuild

1. ~/.emacs (excerpt)

;; Slime settings
(add-to-list 'load-path "~/src/clbuild/source/slime")
(setq inferior-lisp-program "~/bin/mysbcl")
(require 'slime-autoloads)
(add-hook 'lisp-mode-hook (lambda ()
                            (cond ((not (featurep 'slime))
                                   (require 'slime)
                                   (normal-mode)))))
(eval-after-load "slime"
  '(progn
    (add-to-list 'load-path "~/src/clbuild/source/slime/contrib")
    (slime-setup '(slime-fancy slime-asdf slime-banner))
    (setq slime-complete-symbol*-fancy t)
    (setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol)))
(setq slime-backend "~/src/swank-loader.lisp")

2. ~/bin/mysbcl (launches system sbcl with tailored core)

#!/bin/sh
sbcl --core ~/bin/sbcl.core

3. ~/bin/regenerate-mysbcl-core (regenerates mysbcl core with my
favorite packages included).

#!/bin/bash
cd ~/src/clbuild
./clbuild build alexandria iterate drakma cl-who hunchentoot cl-ppcre
cxml slime metabang-bind asdf-system-connections
cp ~/src/clbuild/monster.core ~/bin/sbcl.core

4. ~/src/swank-loader.lisp (swank may be already present in the core
image, so we're careful to not load it again):

(if (not (find-package 'swank-loader))
    (let ((slime-dir (merge-pathnames "src/clbuild/source/slime/"
(user-homedir-pathname))))
      (load (merge-pathnames "swank-loader" slime-dir))))

Best Regards,
Victor.



More information about the clbuild-devel mailing list