-** Running
- To begin using swankr:
- 1. start R;
- 2. load the swank.R file:
-#+BEGIN_SRC R
- source("swank.R")
-#+END_SRC
- 3. at the R prompt, run
-#+BEGIN_SRC R
- swank();
-#+END_SRC
- 4. within emacs, load and initialize slime;
- 5. run slime-connect, accepting the default host and port, and
- acknowledging the protocol version mismatch.
- At this point, a R REPL should appear.
-** Emacs customization
- At a minimum, slime needs to be set up to function. I've
- used the following forms in my =~/.emacs=
-#+BEGIN_SRC emacs-lisp
- (require 'slime)
- (slime-setup '(slime-repl slime-scratch))
-#+END_SRCA
+** Emacs configuration
+*** Installing SLIME
+ [[http://common-lisp.net/project/slime/][SLIME]] is required separately from swankr. To install slime,
+ perhaps the simplest is to pull the [[https://github.com/slime/slime][git sources]] into a
+ user-specific site directory, and arrange for that to be on the
+ emacs =load-path=; something like the following:
+#+begin_src sh
+mkdir -p ~/.emacs.d/site-lisp
+cd ~/.emacs.d/site-lisp
+git clone https://github.com/slime/slime.git
+#+end_src
+
+ Following that, I have in my =~/.emacs= (you will need to adjust
+ paths to executables and source files):
+#+begin_src emacs-lisp
+;;; ~/.emacs.d/
+(let ((default-directory (concat user-emacs-directory (convert-standard-filename "site-lisp/"))))
+ (normal-top-level-add-subdirs-to-load-path))
+
+;;; SLIME
+(require 'slime)
+(setq slime-net-coding-system 'utf-8-unix)
+(slime-setup '(slime-asdf slime-repl slime-scratch slime-presentations slime-media))
+(setq slime-lisp-implementations
+ '((sbcl ("sbcl" "--dynamic-space-size" "2048" "--load" "/home/csr21/src/lisp/quicklisp/setup.lisp"))
+ (git-sbcl ("sh" "/home/csr21/src/lisp/sbcl/run-sbcl.sh" "--dynamic-space-size" "2048"))
+ (R ("R" "--no-save" "--max-vsize=4096M" "--interactive")
+ :init (lambda (port-filename coding-system)
+ (load "/home/csr21/src/R/swankr/swankr")
+ (format
+ "source('/home/csr21/src/R/swankr/swank.R', keep.source=TRUE, chdir=TRUE)\nstartSwank('%s')\n" port-filename)))))
+(global-set-key (kbd "s-s") 'slime-selector)
+#+end_src
+*** Additional refinements