Sunday, April 19, 2009

Emacs

The Emacs Editor evaluates Lisp on the fly.  See Programming in Emacs Lisp .

Start the editor by typing emacs at the command prompt and you'll see the GNU Emacs Welcome screen. Type <Ctl l> to begin editing.

Within the editor, enter the following, pressing and holding the Control Key and pressing the following letter where you see <Ctl>.

(+ 2 (* 5 3))<Ctl>x <Ctl>e

The bottom line of the window will show you the result of the evaluation.  If the evaluation results in an error message, type the letter q to return to editing.

Type <Ctl>x <Ctl>c to exit Emacs.

Windowing commands in Emacs:
<Ctl>x 2split current window horizontally
<Ctl>x 3split current window vertically
<Ctl>x oselect other window
<Ctl>x 4 0delete the selected window and kill the buffer
<Ctl>x 1delete all other windows
<Esc>x gbd <Enter>start the debugger in a new window
<Ctl>x kkill the debugger buffer
Buffer Commands
<Ctl>x <C>ssave the buffer
<Ctl>u undo
Other Emacs Commands
<Esc>x tetrisstart the tetris game
Useful Functions
(pwd)display current directory


See http://zoo.cs.yale.edu/classes/cs210/help/emacs.html.