swankr is in the level of integration of various facilities with
emacs: ESS uses the browser() debugger, whereas swankr provides its
own debugger, sldb; swankr provides a custom REPL with hooks for
- common commands; and so on. For Lisp programmers, perhaps the most
- useful analogy is to say that swankr is to ESS what SLIME is to
- ILISP. At present, however, ESS mode remains active in R source
+ common commands; and so on. On the other hand, ESS is mature,
+ feature-rich software, while swankr is only a little more advanced
+ than a proof-of-concept. For Lisp programmers, perhaps the most
+ useful analogy is to say that swankr intends to be to ESS what
+ SLIME is to ILISP. At present, ESS mode remains active in R source
buffers, providing font-locking functionality among other things.
* Installation
** Running
To begin using swankr:
+
1. start R;
2. load the swank.R file:
#+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.
+#+BEGIN_SRC emacs-lisp
+ (require 'slime)
+ (slime-setup '(slime-repl))
+#+END_SRC
+ 5. run =M-x slime-connect=, accepting the default host and port,
+ and acknowledging the protocol version mismatch.
+
+ At this point, an 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
+ (slime-setup '(slime-repl slime-scratch slime-media))
+#+END_SRC
+ The =slime-media= contrib is new and (at present) R-specific,
+ allowing for image results to be embedded in the REPL.
+
In addition, for keybindings like =C-c C-c= to work properly, emacs
needs to be told how to guess where a function definition begins.
This can be achieved with /e.g./
accessible through
<http://common-lisp.net/r/users/crhodes/swankr.git> and
git://common-lisp.net/crhodes/swankr/swankr.git; a web view of the
- development history is [[http://common-lisp.net/gitweb?p=users/crhodes/swankr.git][available through gitweb]].
+ development history is [[http://common-lisp.net/gitweb?p=users/crhodes/swankr.git][available through gitweb]]. You can also view
+ the current lists of [[file:BUGS.org]] and [[file:TODO.org]] items.
* Acknowledgments
Thanks to my colleagues at [[http://www.gold.ac.uk/][Goldsmiths, University of London]], for
suggesting that I investigate R for numerical and graphical