Skip to content

Instantly share code, notes, and snippets.

@lukego
Last active June 15, 2023 19:03
Show Gist options
  • Save lukego/0b74b94492066ae2b8c2a12b18e845c7 to your computer and use it in GitHub Desktop.
Save lukego/0b74b94492066ae2b8c2a12b18e845c7 to your computer and use it in GitHub Desktop.
CLIME installation instructions

CLIME

CLIME is an Emacs/SLIME backend for McCLIM. It lets you call CLIM drawing routines at the SLIME REPL and see rendered images inline in Emacs. It also supports Presentations so that you can (accept TYPE) and click in Emacs to choose an object.

Quick overview

Scroll down to see screenshots!

Installation

CLIME is intended to become a standard feature of SLIME and McCLIM but for now it is experimental and lives in forked repositories of those projects:

One way to install CLIME is:

  • Checkout the McCLIM repository.
  • Add McCLIM to your Lisp system path e.g. ~/quicklisp/local-systems/.
  • Checkout the SLIME repository.
  • Add (load "/path/to/slime/slime.el") to your Emacs initialization.
  • Add (pushnew 'slime-clime slime-contribs) to your Emacs initialization. If you run this in a running Emacs then also run (slime-setup) so that it takes effect.

Then you should be able to run examples at the SLIME REPL such as:

(in-package :clim-emacs)
(with-output-to-emacs (s)
         (surrounding-output-with-border (s :shape :ellipse)
           (draw-circle* s 0 0 50 :ink +red+)))
(in-package :clim-emacs)
(with-output-to-emacs (s)
  (with-drawing-options (s :ink +black+)
    (format-graph-from-roots (list "clim-basic")
                             #'print
                             (lambda (system)
                               (ignore-errors (asdf/system:system-depends-on
                                               (asdf/system:find-system system))))
                             :stream s)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment