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