S.L.I.M.E. = superior LISP interaction mode for emacs.
It is my recommendation for writing, running, and debugging LISP code (though some people prefer the CUSP SBCL plugin for ECLIPSE).
If you want to get started on slime on a CSEE Linux machine, edit your $HOME/.emacs and add these lines.
(setq inferior-lisp-program "/usr/bin/sbcl --noinform") ;; this path is WVU CSEE specific (add-to-list 'load-path "/usr/share/common-lisp/source/slime/") ;; this path is WVU CSEE specific (setq slime-path "/usr/share/common-lisp/source/slime/") (require 'slime) (slime-autodoc-mode) (slime-setup) (add-hook 'lisp-mode-hook (lambda () (slime-mode t) (local-set-key "\r" 'newline-and-indent) (setq lisp-indent-function 'common-lisp-indent-function) (setq indent-tabs-mode nil))) (global-set-key "\C-cs" 'slime-selector)
Then fire up emacs and type M-x slime.
After that, any .lisp file you edit will have some cool LISP bindings (see http://common-lisp.net/project/slime/doc/html/Compilation.html#Compilation).
Here's some nice tricks to add to your $HOME/.emacs.
They do many things, including making mouse clicking work in text windows.
(xterm-mouse-mode t) ; make mouse work in text windows (transient-mark-mode t) ; show incremental search results (setq scroll-step 1) ; don't scroll in large jumps (setq require-final-newline t) ; every file has at least one new line (setq inhibit-startup-message t) ; disable start up screen (global-font-lock-mode t 1) ; enable syntax highlighting (line-number-mode t) ; show line numbers & time in status line ; show line numbers and time in status line (setq display-time-24hr-format nil) (display-time)
Do you think emacs is boring to look at? When you highlight text, does the default color scheme obscure the thing you need to see?
You can fix that with another color scheme. And there are many to select from: check out this EMACS color theme tester.
If you think those screens look better than your current EMACS screen, then:
mkdir $HOME/src/lisp cd $HOME/src/lisp wget http://download.gna.org/color-theme/color-theme-6.6.0.tar.gz tar xfvz color-theme-6.6.0.tar.gz cd $HOME
Edit $HOME/.emacs with some other editor; e.g. nano .emacs. Add these lines:
(setq load-path (cons "~/src/lisp/color-theme-6.6.0" load-path)) (require 'color-theme) (color-theme-initialize) (color-theme-hober)
If it doesn't seem to work, try adding one more line:
(require 'color-theme) (setq color-theme-is-global t) (color-theme-hober)
If the hober theme don't do it for you, try some other themes:
M-x color-theme-select RET
If all the above EMACS/SLIME configuration works then you should be able to SSH into your account and generate a screen that looks like this:
Place your code in a file "main.lisp".
Write a second file called "lisp":
#| exec sbcl --noinform --load $0 --end-toplevel-options "$@" |# (load "main.lisp") (quit)
Make that file executable:
chmod +x lisp
Now, when you call "./lisp", your code in "main.lisp" is executed.