Most Campus Network systems support GNU Emacs, the full-screen editor from the Free Software Foundation. A versatile assemblage of editing, file management, and programming sup port, GNU Emacs is one of the most widely used programs on UNIX systems.
When Emacs is invoked, it loads an intitialization file unless a command line switch is used to prevent it. Called the ‘.emacs’ file, it should reside in your home directory. If one does not currently exist, you can create one based on examples in the GNU Emacs Manual.
Emacs command line switches and arguments
You can invoke Emacs in several ways. The program can be invoked by simply typing ‘emacs’ at the shell prompt, with or without the name of a file to edit.
Emacs can open several files for editing in one command by using wildcard characters in the filename.
You can open a file for editing at a specified line with Emacs by means of the ‘+’ argument.
emacs +linenum file
You can invoke Emacs without the customized features in your Emacs initialization file, ~/.emacs.
emacs -q [file]
Another user’s initialization (~user/.emacs) file can be used instead of your own.
emacs -u user [file]
You can invoke Emacs with the name of a file containing boiler-plate text which you wish to insert into another file or into an unnamed (scratch) buffer.
emacs [file] -i insertfile
Emacs can use a file as the device for terminal input and output.
emacs -t [file or device]
Emacs works well with the X Window System. The ‘d’ switch directs Emacs to use a specified display window as its terminal.
emacs -d displayname
Lastly, Emacs will operate in batch mode (useful for Lisp programs) with the ‘batch’ switch.
emacs -batch commandfile
Several switches ( -t -d -batch -q -u) have to be placed at the beginning of the argument list, and in that order if more than one of them appears.
The GNU Emacs Manual by Richard Stallman is the standard reference. Reference copies may be available through your system administrator.
Type <CTRL> h t within Emacs for an brief, interactive tutorial.
Type <CTRL> h i within Emacs to invoke the ‘info mode.’
Type man emacs at the shell prompt for a command synopsis.