(direct_output_for_insert): If char_ins_del_ok is
[bpt/emacs.git] / etc / emacs.1
CommitLineData
a7bfd66f
DL
1.TH EMACS 1 "1995 December 7"
2.UC 4
3.SH NAME
4emacs \- GNU project Emacs
5.SH SYNOPSIS
6.B emacs
7[
8.I command-line switches
9] [
10.I files ...
11]
12.br
13.SH DESCRIPTION
14.I GNU Emacs
15is a version of
16.I Emacs,
17written by the author of the original (PDP-10)
18.I Emacs,
19Richard Stallman.
20.br
21The primary documentation of GNU Emacs is in the GNU Emacs Manual,
22which you can read on line using Info, a subsystem of Emacs. Please
23look there for complete and up-to-date documentation. This man page
24is updated only when someone volunteers to do so; the Emacs
25maintainers' priority goal is to minimize the amount of time this man
26page takes away from other more useful projects.
27.br
28The user functionality of GNU Emacs encompasses
29everything other
30.I Emacs
31editors do, and it is easily extensible since its
32editing commands are written in Lisp.
33.PP
34.I Emacs
35has an extensive interactive help facility,
36but the facility assumes that you know how to manipulate
37.I Emacs
38windows and buffers.
39CTRL-h (backspace
40or CTRL-h) enters the Help facility. Help Tutorial (CTRL-h t)
41requests an interactive tutorial which can teach beginners the fundamentals
42of
43.I Emacs
44in a few minutes.
45Help Apropos (CTRL-h a) helps you
46find a command given its functionality, Help Character (CTRL-h c)
47describes a given character's effect, and Help Function (CTRL-h f)
48describes a given Lisp function specified by name.
49.PP
50.I Emacs's
51Undo can undo several steps of modification to your buffers, so it is
52easy to recover from editing mistakes.
53.PP
54.I GNU Emacs's
55many special packages handle mail reading (RMail) and sending (Mail),
56outline editing (Outline), compiling (Compile), running subshells
57within
58.I Emacs
59windows (Shell), running a Lisp read-eval-print loop
60(Lisp-Interaction-Mode), and automated psychotherapy (Doctor).
61.PP
62There is an extensive reference manual, but
63users of other Emacses
64should have little trouble adapting even
65without a copy. Users new to
66.I Emacs
67will be able
68to use basic features fairly rapidly by studying the tutorial and
69using the self-documentation features.
70.PP
71.SM Emacs Options
72.PP
73The following options are of general interest:
74.TP 8
75.I file
76Edit
77.I file.
78.TP
79.BI \+ number
80Go to the line specified by
81.I number
82(do not insert a space between the "+" sign and
83the number).
84.TP
85.B \-q
86Do not load an init file.
87.TP
88.BI \-u " user"
89Load
90.I user's
91init file.
92.TP
93.BI \-t " file"
94Use specified
95.I file
96as the terminal instead of using stdin/stdout.
97This must be the first argument specified in the command line.
98.PP
99The following options are lisp-oriented
100(these options are processed in the order encountered):
101.TP 8
102.BI \-f " function"
103Execute the lisp function
104.I function.
105.TP
106.BI \-l " file"
107Load the lisp code in the file
108.I file.
109.PP
110The following options are useful when running
111.I Emacs
112as a batch editor:
113.TP 8
114.BI \-batch
115Edit in batch mode. The editor will send messages to stderr. This
116option must be the first in the argument list. You must use -l and -f
117options to specify files to execute and functions to call.
118.TP
119.B \-kill
120Exit
121.I Emacs
122while in batch mode.
123.\" START DELETING HERE IF YOU'RE NOT USING X
124.PP
125.SM Using Emacs with X
126.PP
127.I Emacs
128has been tailored to work well with the X window system.
129If you run
130.I Emacs
131from under X windows, it will create its own X window to
132display in. You will probably want to start the editor
133as a background process
134so that you can continue using your original window.
135.PP
136.I Emacs
137can be started with the following X switches:
138.TP 8
139.BI \-name " name"
140Specifies the name which should be assigned to the initial
141.I Emacs
142window. This controls looking up X resources as well as the window title.
143.TP 8
144.BI \-title " name"
145Specifies the title for the initial X window.
146.TP 8
147.B \-r
148Display the
149.I Emacs
150window in reverse video.
151.TP
152.B \-i
153Use the "kitchen sink" bitmap icon when iconifying the
154.I Emacs
155window.
156.TP
157.BI \-font " font, " \-fn " font"
158Set the
159.I Emacs
160window's font to that specified by
161.I font.
162You will find the various
163.I X
164fonts in the
165.I /usr/lib/X11/fonts
166directory.
167Note that
168.I Emacs
169will only accept fixed width fonts.
170Under the X11 Release 4 font-naming conventions, any font with the
171value "m" or "c" in the eleventh field of the font name is a fixed
172width font. Furthermore, fonts whose name are of the form
173.IR width x height
174are generally fixed width, as is the font
175.IR fixed .
176See
177.IR xlsfonts (1)
178for more information.
179
180When you specify a font, be sure to put a space between the
181switch and the font name.
182.TP
9002d21f 183.BI \-bw " pixels"
a7bfd66f
DL
184Set the
185.I Emacs
186window's border width to the number of pixels specified by
187.I pixels.
188Defaults to one pixel on each side of the window.
189.TP
190.BI \-ib " pixels"
191Set the window's internal border width to the number of pixels specified
192by
193.I pixels.
194Defaults to one pixel of padding on each side of the window.
195.PP
196.TP 8
197.BI \-geometry " geometry"
198Set the
199.I Emacs
200window's width, height, and position as specified. The geometry
201specification is in the standard X format; see
202.IR X (1)
203for more information.
204The width and height are specified in characters; the default is 80 by
20524.
206.PP
207.TP 8
208.BI \-fg " color"
209On color displays, sets the color of the text.
210
211See the file
212.I /usr/lib/X11/rgb.txt
213for a list of valid
214color names.
215.TP
216.BI \-bg " color"
217On color displays,
218sets the color of the window's background.
219.TP
220.BI \-bd " color"
221On color displays,
222sets the color of the window's border.
223.TP
224.BI \-cr " color"
225On color displays,
226sets the color of the window's text cursor.
227.TP
228.BI \-ms " color"
229On color displays,
230sets the color of the window's mouse cursor.
231.TP
232.BI \-d " displayname, " \-display " displayname"
233Create the
234.I Emacs
235window on the display specified by
236.IR displayname .
237Must be the first option specified in the command line.
238.TP
239.B \-nw
240Tells
241.I Emacs
242not to use its special interface to X. If you use this
243switch when invoking
244.I Emacs
245from an
246.IR xterm (1)
247window, display is done in that window.
248This must be the first option specified in the command line.
249.PP
250You can set
251.I X
252default values for your
253.I Emacs
254windows in your
255.I \.Xresources
256file (see
257.IR xrdb (1)).
258Use the following format:
259.IP
260emacs.keyword:value
261.PP
262where
263.I value
264specifies the default value of
265.I keyword.
266.I Emacs
267lets you set default values for the following keywords:
268.TP 8
269.B font (\fPclass\fB Font)
270Sets the window's text font.
271.TP
272.B reverseVideo (\fPclass\fB ReverseVideo)
273If
274.I reverseVideo's
275value is set to
276.I on,
277the window will be displayed in reverse video.
278.TP
279.B bitmapIcon (\fPclass\fB BitmapIcon)
280If
281.I bitmapIcon's
282value is set to
283.I on,
284the window will iconify into the "kitchen sink."
285.TP
286.B borderWidth (\fPclass\fB BorderWidth)
287Sets the window's border width in pixels.
288.TP
289.B internalBorder (\fPclass\fB BorderWidth)
290Sets the window's internal border width in pixels.
291.TP
292.B foreground (\fPclass\fB Foreground)
293For color displays,
294sets the window's text color.
295.TP
296.B background (\fPclass\fB Background)
297For color displays,
298sets the window's background color.
299.TP
300.B borderColor (\fPclass\fB BorderColor)
301For color displays,
302sets the color of the window's border.
303.TP
304.B cursorColor (\fPclass\fB Foreground)
305For color displays,
306sets the color of the window's text cursor.
307.TP
308.B pointerColor (\fPclass\fB Foreground)
309For color displays,
310sets the color of the window's mouse cursor.
311.TP
312.B geometry (\fPclass\fB Geometry)
313Sets the geometry of the
314.I Emacs
315window (as described above).
316.TP
317.B title (\fPclass\fB Title)
318Sets the title of the
319.I Emacs
320window.
321.TP
322.B iconName (\fPclass\fB Title)
323Sets the icon name for the
324.I Emacs
325window icon.
326.PP
327If you try to set color values while using a black and white display,
328the window's characteristics will default as follows:
329the foreground color will be set to black,
330the background color will be set to white,
331the border color will be set to grey,
332and the text and mouse cursors will be set to black.
333.PP
334.SM Using the Mouse
335.PP
336The following lists the mouse button bindings for the
337.I Emacs
338window under X11.
339
340.in +\w'CTRL-SHIFT-middle'u+4n
341.ta \w'CTRL-SHIFT-middle'u+4n
342.ti -\w'CTRL-SHIFT-middle'u+4n
343MOUSE BUTTON FUNCTION
344.br
345.ti -\w'CTRL-SHIFT-middle'u+4n
346left Set point.
347.br
348.ti -\w'CTRL-SHIFT-middle'u+4n
349middle Paste text.
350.br
351.ti -\w'CTRL-SHIFT-middle'u+4n
352right Cut text into X cut buffer.
353.br
354.ti -\w'CTRL-SHIFT-middle'u+4n
355SHIFT-middle Cut text into X cut buffer.
356.br
357.ti -\w'CTRL-SHIFT-middle'u+4n
358SHIFT-right Paste text.
359.br
360.ti -\w'CTRL-SHIFT-middle'u+4n
361CTRL-middle Cut text into X cut buffer and kill it.
362.br
363.ti -\w'CTRL-SHIFT-middle'u+4n
364CTRL-right Select this window, then split it into
365two windows. Same as typing CTRL-x 2.
366.\" START DELETING HERE IF YOU'RE NOT USING X MENUS
367.br
368.ti -\w'CTRL-SHIFT-middle'u+4n
369CTRL-SHIFT-left X buffer menu--hold the buttons and keys
370down, wait for menu to appear, select
371buffer, and release. Move mouse out of
372menu and release to cancel.
373.br
374.ti -\w'CTRL-SHIFT-middle'u+4n
375CTRL-SHIFT-middle X help menu--pop up index card menu for
376Emacs help.
377.\" STOP DELETING HERE IF YOU'RE NOT USING X MENUS
378.br
379.ti -\w'CTRL-SHIFT-middle'u+4n
380CTRL-SHIFT-right Select window with mouse, and delete all
381other windows. Same as typing CTRL-x 1.
382.\" STOP DELETING HERE IF YOU'RE NOT USING X
383.PP
384.SH MANUALS
385You can order printed copies of the GNU Emacs Manual from the Free
386Software Foundation, which develops GNU software. See the file ORDERS
387for ordering information.
388.br
389Your local Emacs maintainer might also have copies available. As
390with all software and publications from FSF, everyone is permitted to
391make and distribute copies of the Emacs manual. The TeX source to the
392manual is also included in the Emacs source distribution.
393.PP
394.SH FILES
395/usr/local/info - files for the Info documentation browser
396(a subsystem of Emacs) to refer to. Currently not much of Unix
397is documented here, but the complete text of the Emacs reference
398manual is included in a convenient tree structured form.
399
400/usr/local/share/emacs/$VERSION/src - C source files and object files
401
402/usr/local/share/emacs/$VERSION/lisp - Lisp source files and compiled files
403that define most editing commands. Some are preloaded;
404others are autoloaded from this directory when used.
405
406/usr/local/share/emacs/$VERSION/etc - various programs that are used with
407GNU Emacs, and some files of information.
408
409/usr/local/share/emacs/$VERSION/etc/DOC.* - contains the documentation
410strings for the Lisp primitives and preloaded Lisp functions
411of GNU Emacs. They are stored here to reduce the size of
412Emacs proper.
413
414/usr/local/share/emacs/$VERSION/etc/OTHER.EMACSES discusses GNU Emacs
415vs. other versions of Emacs.
416.br
417/usr/local/share/emacs/$VERSION/etc/SERVICE lists people offering
418various services to assist users of GNU Emacs, including education,
419troubleshooting, porting and customization.
420.br
421These files also have information useful to anyone wishing to write
422programs in the Emacs Lisp extension language, which has not yet been fully
423documented.
424
425/usr/local/com/emacs/lock - holds lock files that are made for all
426files being modified in Emacs, to prevent simultaneous modification
427of one file by two users.
428
429.\" START DELETING HERE IF YOU'RE NOT USING X
430/usr/lib/X11/rgb.txt - list of valid X color names.
431.\" STOP DELETING HERE IF YOU'RE NOT USING X
432.PP
433.SH BUGS
434There is a mailing list, bug-gnu-emacs@prep.ai.mit.edu on the internet
435(ucbvax!prep.ai.mit.edu!bug-gnu-emacs on UUCPnet), for reporting Emacs
436bugs and fixes. But before reporting something as a bug, please try
437to be sure that it really is a bug, not a misunderstanding or a
438deliberate feature. We ask you to read the section ``Reporting Emacs
439Bugs'' near the end of the reference manual (or Info system) for hints
440on how and when to report bugs. Also, include the version number of
441the Emacs you are running in \fIevery\fR bug report that you send in.
442
443Do not expect a personal answer to a bug report. The purpose of reporting
444bugs is to get them fixed for everyone in the next release, if possible.
445For personal assistance, look in the SERVICE file (see above) for
446a list of people who offer it.
447
448Please do not send anything but bug reports to this mailing list.
449Send requests to be added to mailing lists to the special list
450info-gnu-emacs-request@prep.ai.mit.edu (or the corresponding UUCP
451address). For more information about Emacs mailing lists, see the
452file /usr/local/emacs/etc/MAILINGLISTS. Bugs tend actually to be
453fixed if they can be isolated, so it is in your interest to report
454them in such a way that they can be easily reproduced.
455.PP
456Bugs that I know about are: shell will not work with programs
457running in Raw mode on some Unix versions.
458.SH UNRESTRICTIONS
459.PP
460.I Emacs
461is free; anyone may redistribute copies of
462.I Emacs
463to
464anyone under the terms stated in the
465.I Emacs
466General Public License,
467a copy of which accompanies each copy of
468.I Emacs
469and which also
470appears in the reference manual.
471.PP
472Copies of
473.I Emacs
474may sometimes be received packaged with distributions of Unix systems,
475but it is never included in the scope of any license covering those
476systems. Such inclusion violates the terms on which distribution
477is permitted. In fact, the primary purpose of the General Public
478License is to prohibit anyone from attaching any other restrictions
479to redistribution of
480.I Emacs.
481.PP
482Richard Stallman encourages you to improve and extend
483.I Emacs,
484and urges that
485you contribute your extensions to the GNU library. Eventually GNU
486(Gnu's Not Unix) will be a complete replacement for Berkeley
487Unix.
488Everyone will be free to use, copy, study and change the GNU system.
489.SH SEE ALSO
490X(1), xlsfonts(1), xterm(1), xrdb(1)
491.SH AUTHORS
492.PP
493.I Emacs
494was written by Richard Stallman and the Free Software Foundation.
495Joachim Martillo and Robert Krawitz added the X features.