I have put together these notes as a ``crash start'' guide to using Emacs. You will find out the bare-basics of what is needed to get work done. There is a 2-page reference card on Emacs available. The resource center may be able to supply you with a copy, or you can print your own. On Unix, type
% lpr /usr/local/common/lib/emacs/19.34/etc/refcard.ps
When you login to Unix, the first thing you should do it run emacs. You will have no need to exit from emacs until you finish your session.
When emacs starts up, you will see the window is split into three regions: the main editing window, a ``mode line'' and an ``minibuffer window'' (used for displaying informational messages and reading command arguments).
The main window can be split vertically and/or horizontally. This is useful as it lets you edit your files and look at the output of Prolog at the same time.
Each window can display a ``buffer'' -- usually a file, or the output of another program (like prolog). You can have more buffers than there are windows. Commands are available for selecting which buffer to display in a window.
The notation M-x is shorthand for META-x (press ESC and then press x).
To save a file, press C-x C-s.
You should be able use the arrow keys to move around. Typing an ordinary character will insert that character. The reference card gives you some more movement commands.
To select a region of text, press C-spc (i.e. CONTROL-SPACE), and move the cursor to the other end of the region.
You can delete a region with C-w, and put it back somewhere else with C-y
You can now move between Prolog and your source file with C-x o.
You can load a section of your program into Prolog by placing the mark at one end of the region (C-spc) and moving the cursor to the other end. Then press M-C-x (i.e. press ESC, then CONTROL-x).
To load the whole file into Prolog, select the whole buffer with C-x h, then press M-C-x.
To interrupt Prolog (if it gets into a loop), switch to the *prolog* window with C-x o if necessary, and type C-c C-c.
The key C-g is used to interrupt Emacs and return to the normal editing state. You can use it to stop Emacs asking you to enter something in the minibuffer, for example.
Session +-------------+ | Backspace | NO tick mark |*Delete | ticked +-------------+ | Local echo | NO tick mark | Wrap mode | doesn't matter |*Emacs arrows| ticked | Map PgUp/...| NO tick mark | ... | (irrelevant) +-------------+ | Set screen | do this manually (hold down OPTION | size | and resize window with the mouse) +-------------+ | Setup keys..| ALL entries MUST be blank!!! | ... | +-------------+A set of function key bindings is available for use with NCSA Telnet 2.6 on the Macintoshes in the lab. To use them, type M-x load-file RET ~j-hamer/Emacs/NCSA-telnet.el RET. Press the HELP key on the middle keypad for a description of the key bindings.
You can load these bindings automatically by placing the following line in your ~/.emacs file:
(load-file "/users/staff/j-hamer/Emacs/NCSA-telnet.el")