



Note that here I've cd'd into my ~/cs107/assign1 directory before opening emacs, so the path defaults to this. You will see a prompt at the bottom of the window (this little section is called the mini-buffer) that says Find file: ~/cs107/assign1/ If you started without a filename, or you want to open a new file use the keyboard shortcut Ctrl-x Ctrl-f. emacs -nwĪlternately, if you already know what file you want to edit, you can cd to the appropriate directory and pass the filename as a parameter to emacs as follows: emacs reassemble.c& If you prefer to work in a console, then you will want to add the -nw flag ("no window"), e.g. If you want to be able to continue using your terminal while using emacs, add an ampersand: emacs& Note that this locks up your console as long as emacs is open (the console is "busy" running emacs). This will open the windowed version if it is available (again, it might be disabled depending on which client you are using for your connection). The easiest way to launch the program is to simply type "emacs" and hit enter, which will look like the following: emacs Once you've decided which version you want to run, log in to your favorite cluster using whatever client you like. Further, if you use a non-windowing client like PuTTY, you have no choice but to use the text-based version. The emacs GUI has several features that make using emacs as a first-time user much easier, but if you're on a slow connection, it can be agonizingly laggy. Soon, you might feel that Notepad is the unwieldy one! Opening EmacsĮmacs has two versions: the GUI version which runs in a separate window and has buttons and menus for common functions, and the text-based version which runs in your console window. However, taking a bit of time to learn Emacs's unique shortcuts will make you much more efficient. In fact, you could survive decently well by using it just like Notepad, navigating the document with arrow keys and clicking buttons to save and load. Using Emacs is in many ways like using any text editor you are used to (such as Notepad on Windows), but with many unusual keyboard shortcuts. All it's missing is a decent text editor." As an old joke goes, "Emacs is an excellent operating system. In this document, we will only be talking about the basic text-editing functions, but people have written extensions to Emacs to, for example, allow it to send and receive email. What is Emacs? Why should I use it?Įmacs is a text editing program with a very wide and powerful set of features. If you're interested in another editor, some internet research will likely turn up useful resources. You'll find our staff is generally most familiar with the mainstream emacs or vim, but you're welcome to use any editor that gets the job done for you. Emacs has been good to us but there are other good Unix text editors (vim, pico, gedit, and more). This guide covers the basics of using emacs to edit files. Written by Sarah Spikes, updated by David Philipson
