To run GNU-Emacs, type
emacs filename
If you are running X windows, a separate window will pop up. Emacs reads the file you specify into an internal "buffer," which you can then modify and eventually write back to disk. You view the buffer through a "window." Each window displays the contents of one buffer, but you can open multiple windows into a buffer. Beneath each window is a "mode line" that gives the buffer name, filename, and mode type. At the bottom of the screen you'll see the minibuffer where Emacs displays messages and accepts extended commands.
Note that the sequence "^h" (ctrl+h) leads to a large
amount of online documentation. For an introductory tutorial, type "^ht".
Enter text by simply typing it; most keys insert the corresponding ASCII character. You can manipulate the display or contents using controlcharacters, escape sequences, and several other key combinations bound to function commands. Such key bindings allow you, for example, to move the cursor with a minimum of keystrokes.
If you're running X windows, you can use the menu at the top of your window to manipulate text. Note that if you bring up an HTML file, you will start the GNU-Emacs HTML editor. You can also use the following tables to find commands that allow you to move the cursor within a buffer, find and change text, make changes to window, save text and get help. To exit Emacs, type "^x^c".
^b Move cursor one character back. ^f Move cursor one character up. [ESC]-b Move cursor one word back. [ESC]-f Move cursor one word up. ^a Move cursor to line beginning. ^e Move cursor to line end. [ESC]-a Move to sentence beginning. [ESC]-e Move to sentence end. [ESC]-< Move to beginning of buffer. [ESC]-> Move to end of buffer.
-------------------------------------------------------------------------------
^s Forward search. ^r Reverse search. [ESC]-% Query replacement. ! Apply replacement to all occurrences. ^@, ^[SPACE] Set mark. ^w Delete between dot and mark. ^y Yank back killbuffer contents. ^t Transpose two previous letters. [ESC]-u Make word upper case (use at beginning of word). [ESC]-l Make a word lower case (use at beginning of word). [DEL] Delete last character. ^k Delete line. ^d Delete next character. [ESC]-[DEL] Delete last word. [ESC]-d Delete next word. ^x-i Insert file.
-------------------------------------------------------------------------------
^x^f Find a file (load it into buffer). ^x^v Find an alternate file (kills current buffer). ^x 2 Split window. ^x o Move to other window. ^x 1 Return to one window. ^l Redraw the screen. ^o Open blank line. [ESC]-v Move window one page back. ^v Move window one page up.
-------------------------------------------------------------------------------
^x^s Save current file. ^x^w Write file, changing the name. ^x^c Write file and exit Emacs. ^_ Undo a previous command. ^g Abort a command. ^hb List keys and bindings. ^hk Describe a key binding. [ESC]-? <keyword> Describe an arbitrary keyword. ^z Halt Emacs temporarily.
For help with any facilities-related problem, please contact help@cs.cmu.edu. If you have questions and comments regarding this documentation, please send mail to help+doc@cs.cmu.edu