Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ emacs(1) — Tru64 UNIX 4.0f

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

X(1X)

xlsfonts(1X)

xrdb(1X)

xterm(1X)

emacs(1)  —  Commands

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:

fileSpecifies the file that you want to edit. 

+number
Moves to the line specified by number.  (Do not insert a space between the + sign and the number.) 

−qSpecifies that the .emacs initialization file is not to be loaded. 

−u user
Loads the .emacs initialization file for the specified user. 

−t file
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:

−f function
Executes the specified Lisp function.

−l file
Loads the lisp code in specified file.

Batch Options

Use the following options to run Emacs as a batch editor:

−batch
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. 

−kill
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:

−rn name
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.

−wn name
Specifies the name which should be assigned to the Emacs window. 

−rDisplays the Emacs window in reverse video. 

−iUses the “kitchen sink” bitmap icon when iconifying the Emacs window. 

−font font, −fn font
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. 

−b pixels
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. 

−ib pixels
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. 

−geometry geometry
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:

−fg color
Sets the color of the text. See the file /usr/lib/X11/rgb.txt for a list of valid color names. 

−bg color
Sets the color of the window’s background.

−bd color
Sets the color of the window’s border.

−cr color
Sets the color of the window’s text cursor.

−ms color
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. 

−d displayname, −display displayname
Creates the Emacs window on the specified display. This must be the first option specified in the command line. 

−nw
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:

font (class Font)
Sets the window’s text font.

reverseVideo (class ReverseVideo)
Displays the window in reverse video if the reverseVideo’s value is set to on. 

bitmapIcon (class BitmapIcon)
Turns the window into the “kitchen sink” icon if the bitmapIcon’s value is set to on. 

borderWidth (class BorderWidth)
Sets the window’s border width in pixels.

internalBorder (class BorderWidth)
Sets the window’s internal border width in pixels.

foreground (class Foreground)
Sets the window’s text color (for color displays only).

background (class Background)
Sets the window’s background color (for color displays only).

borderColor (class BorderColor)
Sets the color of the window’s border (for color displays only).

cursorColor (class Foreground)
Sets the color of the window’s text cursor (for color displays only).

pointerColor (class Foreground)
Sets the color of the window’s mouse cursor (for color displays only).

geometry (class Geometry)
Sets the geometry of the Emacs window (as described above). 

title (class Title)
Sets the title of the Emacs window. 

iconName (class Title)
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

/usr/lib/emacs/info
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. 

/usr/lib/emacs/lisp
Contains Lisp source files and compiled files that define most editing commands.  Some are preloaded; others are autoloaded from this directory when used.

/usr/lib/emacs/etc
Contains various programs that are used with GNU Emacs, and some files of information.

/usr/lib/emacs/etc/DOC.∗
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. 

/usr/lib/emacs/lock
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. 

/usr/lib/X11/rgb.txt
Lists valid X color names.

/usr/lib/X11/fonts
Lists valid X fonts. 

SEE ALSO

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

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026