The slime/emacs demonstration I gave for Lambdaheads 2010-06-14
Common Lisp
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.org
examples.lisp

README.org

Cool SLIME features

The Basics:

  • Editing files:
    • slime-reindent-defun
  • Evalutating expressions (C-c C-c)
  • Indentation (TAB), indentation of macros
  • Compiling & loading whole files (C-c C-k)
  • Finding definitions: M-.

The REPL & shortcuts:

  • , change-directory
  • , defparameter (aka ,!)
  • , in-package

Debugger: examples

  • Backtraces
  • Stack manipulation / evaluating stuff in frames
  • jump to frame source: “v” (not working in sbcl currently?)
  • Error Recovery

Stepper: examples

  • key bindings:
    s
    step into
    x
    next
    c
    continue

Inspector examples

  • Function arguments (RET on stack frames in the debugger)
  • Conditions (C in the debugger)
  • lists (Go back in history: “l”)
  • Packages
  • Generic functions
  • Classes

Cool paredit features

Navigation:

  • forward/backward, up/down
  • M-a / M-e (start / end of defun)

Editing lisp:

  • Auto-insertion of closing paren: Just type like you would otherwise
  • Snarf / Barf: M-left / M-right
  • killing expressions (C-M-k)
  • pulling out expressions: M-up

SLIME contribs

slime-selector: lets you jump around slime easily

slime-asdf: easy loading of third-party code

slime-autodoc: Very nice arglist display

slime-sbcl-exts: Nice condition display, implementation source lookup

Emacs features

show-paren-mode: Nice parenthesis display [builtin]

(show-paren-mode 1) (setq show-paren-delay 0)

full-ack: Fast grepping through a project [full-ack homepage]

(autoload ‘ack-same “full-ack” nil t) (autoload ‘ack “full-ack” nil t) (autoload ‘ack-find-same-file “full-ack” nil t) (autoload ‘ack-find-file “full-ack” nil t)

(defun ack-project (prefix) “Ack for current word at point from the project root (uses full-ack). With prefix argument, search only files of the same type.” (interactive “p”) (require ‘full-ack) (if prefix (ack-run (ack-guess-project-root) nil (current-word)) (ack-run (ack-guess-project-root) nil (append (ack-type) (list (current-word))))))

git-wip: Save every intermediate state of a tree (life saver!) [git-wip on github]

(load “git-wip”)

Every time you save a file, it commits to an invisible “wip” branch. No more hitting undo to get to a known-working state, just checkout the tree from when it was last working.

org-mode: Get organized. [org-mode homepage]

This presentation is an org outline.

It’s awesome, check it out (but it’s too big and unrelated to show here (-:)