Content-type: text/html Man page of emacs

emacs

Section: User Commands (1)
Index Return to Main Contents
 

NAME

emacs - GNU project Emacs  

SYNOPSIS

emacs [command-line switches] [file ...]


 

DESCRIPTION

The GNU Emacs editor is a new version of Emacs, written by the author of the original (PDP-10) Emacs, Richard Stallman. It provides all the user capabilities of other Emacs editors, and it is easily extensible because its editing commands are written in Lisp.

The documentation for GNU Emacs is available online and can be viewed using Info, a subsystem of the Emacs facility. This documentation contains the most up-to-date and complete information. For the most part, users of other Emacs editors should have little trouble adapting without the documentation and new users should progress quickly with the basic features by studying the tutorial and using the self-documenting features of the Emacs facility.

The Emacs editor has an extensive interactive help facility, however, you must know how to manipulate Emacs windows and buffers to use it. To enter the Help facility, enter CTRL-h (backspace or CTRL-h) from with the Emacs facility. There are several help topics available: Help Tutorial (type CTRL-h t) provides an interactive tutorial that teaches beginners the fundamentals of the Emacs facility in a short time. Help Apropos (type CTRL-h a) is used to locate commands. Help Character (type Ctrl-h c) describes a specified character's effect. Help Function (type CTRL-h f) provides information on the specified Lisp function.

The Emacs editor's Undo command can be used to undo several steps of modification to your buffers, so it is easy to recover from editing mistakes.

The GNU Emacs's facility also provides many other features including special packages to handle reading (RMail) and sending (Mail), outline editing (Outline), compiling (Compile), running subshells within the Emacs windows (Shell), running a Lisp read-eval-print loop (Lisp-Interaction-Mode) and more.
 

General Emacs Options

The following options are of general interest: Specifies the file that you want to edit. Moves to the line specified by number. (Do not insert a space between the + sign and the number.) Specifies that the .emacs initialization file is not to be loaded. Loads the .emacs initialization file for the specified user. Uses the specified file as the terminal instead of using standard input and standard output. This must be the first argument specified in the command line.
 

Lisp Options

Use the following options to specify lisp functions and to load lisp code into your files. These options are processed in the order they are specified: Executes the specified Lisp function. Loads the lisp code in specified file.
 

Batch Options

Use the following options to run Emacs as a batch editor: Edits in batch mode. The editor sends messages to standard output. This option must be the first in the argument list. Use the -l and -f options to specify the files to execute and the functions to call. Exits the Emacs facility while in batch mode.
 

Using Emacs with X

The Emacs facility has been tailored to work with the X window system. If you run the Emacs editor under X windows, it creates its own X window in which to display. Starting the editor as a background process (emacs &) is advisable because you can continue using your original window.

An Emacs session is started using following X switches: Specifies the program name which should be used when looking up defaults in the user's X resources. This must be the first option specified in the command line. Specifies the name which should be assigned to the Emacs window. Displays the Emacs window in reverse video. Uses the ``kitchen sink'' bitmap icon when iconifying the Emacs window. Sets the Emacs window's font to the font specified. There are various X fonts in the /usr/lib/X11/fonts directory.

Note that the Emacs facility accepts fixed-width fonts only. Under the X11 Release 4 font-naming conventions, any font with the value m or c in the eleventh field of the font name is a fixed width font. Furthermore, fonts whose name are of the form width x height are generally fixed-width, as is the font fixed.
See the xlsfonts(1X) reference page for more information. Sets the Emacs window's border width to the number of pixels specified by pixels. Defaults to one pixel on each side of the window. Sets the window's internal border width to the number of pixels specified by pixels. Defaults to one pixel of padding on each side of the window. Sets the Emacs window's width, height, and position as specified. The geometry specification is in the standard X format; see X(1X) for more information. The width and height are specified in characters. The default is 80 by 24.
 

Color Options

Use the following options to specify the colors used in an Emacs window on color displays only: Sets the color of the text. See the file /usr/lib/X11/rgb.txt for a list of valid color names. Sets the color of the window's background. Sets the color of the window's border. Sets the color of the window's text cursor. Sets the color of the window's mouse cursor.
 

X Window Options

Use the following options to specify how the Emacs facility interacts with your X window environment. Creates the Emacs window on the specified display. This must be the first option specified in the command line. Tells the Emacs facility not to use its special interface to X. If you use this switch when invoking the Emacs facility from a xterm(1X) window, the display appears in that window. This must be the first option specified in the command line.
 

X Window Keywords

Use the following format to set X default values for your Emacs windows in your .Xresources file (see xrdb(1X)): emacs.keyword:value

In the previous format example, value specifies the default value of the specified keyword. You can set the following default values for keywords: Sets the window's text font. Displays the window in reverse video if the reverseVideo's value is set to on. Turns the window into the ``kitchen sink'' icon if the bitmapIcon's value is set to on. Sets the window's border width in pixels. Sets the window's internal border width in pixels. Sets the window's text color (for color displays only). Sets the window's background color (for color displays only). Sets the color of the window's border (for color displays only). Sets the color of the window's text cursor (for color displays only). Sets the color of the window's mouse cursor (for color displays only). Sets the geometry of the Emacs window (as described above). Sets the title of the Emacs window. Sets the icon name for the Emacs window icon.

If specify color values when using a black and white display, the window's characteristics change as follows: Foreground color defaults to black Background color defaults to white Border color defaults to grey Text and mouse cursors defaults to black
 

Using the Mouse

The following table lists the mouse button bindings for an Emacs window under X11:


GNU Emacs Key Bindings for X Windows
Key Button Function

Unshifted left x-mouse-set-mark

 
middle x-mouse-set-point

 
right x-mouse-select
Control middle x-cut-and-wipe-text

 
right x-mouse-select-and-split
Shift middle x-cut-text

 
right x-paste-text
Control-Shift left x-buffer-menu

 
middle x-help

 
right x-mouse-keep-one-window


 

NOTES


 

Documentation

Hardocpy (postscript format) versions of the Emacs manuals are located in /usr/lib/emacs/doc.

To purchase printed copies of the GNU Emacs Manual contact the Free Software Foundation for information on pricing and ordering instructions. Their address follows:

Free Software Foundation
675 Mass Ave.
Cambridge, MA 02139

All software and publications received from Free Software Foundation can be copied and distributed without permission. The TeX source to the manual is included in the source distribution.
 

Authors

The Emacs facility was written by Richard Stallman and the Free Software Foundation. Joachim Martillo and Robert Krawitz added the X features.
 

UNRESTRICTIONS

The Emacs software and documentation is free. Anyone can distribute copies of the Emacs software and documentation using the terms stated in the Emacs General Public License. A copy of this license accompanies each distribution of the Emacs software, and it is also documented in the reference manual.

Copies of the Emacs software is often packaged with distributions of UNIX systems, but the scope of any licenses governing these systems does not include limiting the Emacs software and documentation in any manner. Such claims violate the terms under which the Emacs software is distributed. The primary purpose of the General Public License is to prohibit anyone from attaching restrictions to the distribution of the Emacs software and documentation.

Richard Stallman encourages you to improve and extend the Emacs software and urges that you contribute your extensions to the GNU library. Eventually, GNU (GNU's Not UNIX) is intended to be a complete replacement for Berkeley UNIX. All persons will be able to use the GNU system for free.
 

FILES

Contains files for the Info documentation browser, a subsystem of the Emacs facility). Although not much UNIX documentation is included in this library, the Emacs reference manual is included in a convenient tree structure. Contains Lisp source files and compiled files that define most editing commands. Some are preloaded; others are autoloaded from this directory when used. Contains various programs that are used with GNU Emacs, and some files of information. Contains the documentation strings for the Lisp primitives and preloaded Lisp functions of GNU Emacs. They are stored here to reduce the size of Emacs proper. Holds lock files that are made for all files that are modified in the Emacs facility. These files prevent simultaneous modifications of one file by two users. Lists valid X color names. Lists valid X fonts.
 

SEE ALSO

Commands: X(1X), xlsfonts(1X), xrdb(1X), xterm(1X)


 

Index

NAME
SYNOPSIS
DESCRIPTION
General Emacs Options
Lisp Options
Batch Options
Using Emacs with X
Color Options
X Window Options
X Window Keywords
Using the Mouse
NOTES
Documentation
Authors
UNRESTRICTIONS
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 02:43:05 GMT, October 02, 2010