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