next up previous
Next: SAS Up: No Title Previous: Basic UNIX commands

emacs

The text editing program I recommend you use to create and change your SAS programs, and to read the results, is called emacs (an acronym for ``editor macros"). Typing the UNIX command ``emacs'' starts the emacs program. The emacs program includes a built-in online tutorial. When the initial full-screen display has appeared, you can type C-h t to start the tutorial. [For Mac people: C-h means you need to press the CONTROL key (sometimes marked ctrl) and then press the h key while still holding down the CONTROL key.] To start the tutorial you need to do C-h, then release both keys, then press the t key. The expression C-h t refers to this sequence of keystrokes. Do not type a space character before typing the t.

To go through the entire emacs tutorial will take about an hour, a bit more if you're not used to typing commands to get a computer to do what you want; i.e., the style of interaction with the program is very different from what you're probably used to if you usually work on a Mac. For working with SAS, you will need most of the material in the emacs tutorial.

To leave emacs permanently, type C-x C-c. You can use C-z to leave emacs temporarily, i.e., to suspend emacs and return to the UNIX command processor (the ``shell'' program called ``csh''). If you suspend emacs in this way, the UNIX command %e will return you to where you left off in emacs. If you have suspended emacs by typing C-z, don't use the command emacs to try to resume editing. Doing that will not return you to where you were, but rather start a fresh, independent emacs session from scratch. You will have to stop your emacs session permanently, by typing C-x C-c, before csh will let you log off.

If you type C-z accidentally (this is easy to do), the UNIX command %e should get you back to where you were in emacs. You will know you typed C-z and suspended emacs, if suddenly at the bottom of your screen you see the following:

Suspended

tempter%

There is one complication with SEARCHING, such that you might not be able to follow the instructions in the tutorial exactly. Some terminal emulation programs will not transmit the C-s sequence, but instead will respond to C-s by freezing the screen. If this happens when you type C-s in emacs, you will need to type C-q to unfreeze the screen. If you have this problem, you will have to use a longer command to do an incremental forward search. I.e., instead of C-s, use M-x isearch-f


next up previous
Next: SAS Up: No Title Previous: Basic UNIX commands

Jonathan Wand
Mon Nov 16 23:44:57 EST 1998