1. Getting Started with the GNU Emacs Tutorial This documentation is not going to say much; GNU Emacs already has a very nice tutorial built in that will help you learn most of the things you need to know. *The* main thing to know about GNU emacs is the help key: C-H (control-H). This key is used as a prefix for several useful help functions. For example, you can start the tutorial with C-H followed by t. The GNU Emacs documentation uses a different notation for control and escape characters: control characters are written as C-x, where "x" is the control character. Escape characters are written M-x. You type them in by hitting Esc followed by the character (don't hold down Esc). Thus control-H followed by t would be written: C-h t. Try going into GNU emacs and hitting C-h t. By the time you come out of the tutorial, you should be well-equipped to deal with GNU emacs. For more advanced help, GNU Emacs has an on-line help system called info; you can get into it with C-h i. You can learn to use info from info's built-in tutorial. (Read the info intro screen.) 2. Using GNU Emacs with X GNU Emacs is designed to use X as a windowing system. This means you can take advantage of various features of X, such as running a program on one machine while displaying the window on another (networking), resizing or closing the window, managing default parameters in a defaults file (.Xdefaults), starting up from a menu, etc. As you learn how to use X, you can apply your new skills to GNU Emacs too. A couple of notes about X problems on the Apollos that pertain to GNU Emacs: 1) X has been known to crash when you move the mouse cursor to the bottom of the screen. So avoid the bottom of the screen at all costs. 2) Sometimes the Emacs window just freezes up while running in X. It just stops taking keyboard input. Here's how to get around the problem: Start Emacs from a shell (xterm), not from the menu. Type "emacs &". The "&" puts it in the background so that you can continue to use the shell while Emacs is running. If Emacs freezes, bring it into the foreground by typing "%emacs", then hit C-C. This sends an interrupt signal to Emacs which usually wakes it up. You can then put emacs into the background again by hitting C-Z, then typing "bg". 3. GNU Emacs Key Bindings In Emacs, the relationship between keystrokes and actions is completely flexible; key bindings can be customized to each user's tastes. However, the default bindings are not bad, and should come in handy. Here are some of the more frequently used ones. Remember, though, this list is just a quick reference; you will understand these commands much better if you do the tutorial. Help general help for the clueless C-h ? tutorial C-h t info browser C-h i search for a command (apropos) C-h a find out what a keystroke is bound to C-h c keystroke help with special mode C-h m Files & Text visit a file C-x C-f save this buffer C-x C-s save this buffer and specify the file name C-x C-w insert contents of another file into this buffer C-x i undo changes in this buffer (repeat to undo further) C-/ or C-_ or C-x u Deleting delete character before cursor Del delete next character C-d kill to end of line (twice to kill newline too) C-k kill region between cursor and mark C-w yank back last thing killed C-y Moving Cursor move cursor down a line C-n or down-arrow up a line C-p or up-arrow move cursor left C-b or left-arrow move cursor right C-f or right-arrow forward one page C-v backward one page ESC v goto specified line number C-x l print current line number C-x C-l Mark set the mark to be at cursor C-SPC (ctrl-spacebar) exchange cursor and mark positions C-x C-x Buffers & Windows split window in half C-x 2 hide other windows (e.g. to get rid of Help window) C-x 1 return to specified buffer in this window C-x b get a list of existing buffers C-x C-b delete a buffer and its contents C-x k go to next window C-x o refresh screen C-l Search & Replace search forward (incremental) C-s search backward C-r replace string, confirming ESC % get out of a search or a replace ESC Miscellaneous abort a partially typed or executing command C-g argument prefix (usually does command n times) C-u number or ESC num 4. This Documentation was written by Lars Huttar in December 1990. If you have any comments, complaints, or suggestions please send them to me if I'm still around; other- wise to the current student assistant system manager, or Chuck (ctilburg), or whoever. It is my hope that this document can be useful for a while. 1. Getting Started with the GNU Emacs Tutorial This documentation is not going to say much; GNU Emacs already has a very nice tutorial built in that will help you learn most of the things you need to know. *The* main thing to know about GNU emacs is the help key: C-H (control-H). This key is used as a prefix for several useful help functions. For example, you can start the tutorial with C-H followed by t. The GNU Emacs documentation uses a different notation for control and escape characters: control characters are written as C-x, where "x" is the control character. Escape characters are written M-x. You type them in by hitting Esc followed by the character (don't hold down Esc). Thus control-H followed by t would be written: C-h t. Try going into GNU emacs and hitting C-h t. By the time you come out of the tutorial, you should be well-equipped to deal with GNU emacs. For more advanced help, GNU Emacs has an on-line help system called info; you can get into it with C-h i. You can learn to use info from info's built-in tutorial. (Read the info intro screen.) 2. Using GNU Emacs with X GNU Emacs is designed to use X as a windowing system. This means you can take advantage of various features of X, such as running a program on one machine while displaying the window on another (networking), resizing or closing the window, managing default parameters in a defaults file (.Xdefaults), starting up from a menu, etc. As you learn how to use X, you can apply your new skills to GNU Emacs too. A couple of notes about X problems on the Apollos that pertain to GNU Emacs: 1) X has been known to crash when you move the mouse cursor to the bottom of the screen. So avoid the bottom of the screen at all costs. 2) Sometimes the Emacs window just freezes up while running in X. It just stops taking keyboard input. Here's how to get around the problem: Start Emacs from a shell (xterm), not from the menu. Type "emacs &". The "&" puts it in the background so that you can continue to use the shell while Emacs is running. If Emacs freezes, bring it into the foreground by typing "%emacs", then hit C-C. This sends an interrupt signal to Emacs which usually wakes it up. You can then put emacs into the background again by hitting C-Z, then typing "bg". 3. GNU Emacs Key Bindings In Emacs, the relationship between keystrokes and actions is completely flexible; key bindings can be customized to each user's tastes. However, the default bindings are not bad, and should come in handy. Here are some of the more frequently used ones. Remember, though, this list is just a quick reference; you will understand these commands much better if you do the tutorial. Help general help for the clueless C-h ? tutorial C-h t info browser C-h i search for a command (apropos) C-h a find out what a keystroke is bound to C-h c keystroke help with special mode C-h m Files & Text visit a file C-x C-f save this buffer C-x C-s save this buffer and specify the file name C-x C-w insert contents of another file into this buffer C-x i undo changes in this buffer (repeat to undo further) C-/ or C-_ or C-x u Deleting delete character before cursor Del delete next character C-d kill to end of line (twice to kill newline too) C-k kill region between cursor and mark C-w yank back last thing killed C-y Moving Cursor move cursor down a line C-n or down-arrow up a line C-p or up-arrow move cursor left C-b or left-arrow move cursor right C-f or right-arrow forward one page C-v backward one page ESC v goto specified line number C-x l print current line number C-x C-l Mark set the mark to be at cursor C-SPC (ctrl-spacebar) exchange cursor and mark positions C-x C-x Buffers & Windows split window in half C-x 2 hide other windows (e.g. to get rid of Help window) C-x 1 return to specified buffer in this window C-x b get a list of existing buffers C-x C-b delete a buffer and its contents C-x k go to next window C-x o refresh screen C-l Search & Replace search forward (incremental) C-s search backward C-r replace string, confirming ESC % get out of a search or a replace ESC Miscellaneous abort a partially typed or executing command C-g argument prefix (usually does command n times) C-u number or ESC num 4. This Documentation was written by Lars Huttar in December 1990. If you have any comments, complaints, or suggestions please send them to me if I'm still around; other- wise to the current student assistant system manager, or Chuck (ctilburg), or whoever. It is my hope that this document can be useful for a while.