Bump version to 24.0.97.
[bpt/emacs.git] / doc / man / emacs.1
CommitLineData
c89da685 1.\" See section COPYING for copyright and redistribution information.
ee812c5f 2.TH EMACS 1 "2007 April 13" "GNU Emacs 24.0.97"
cbe77461
GM
3.
4.
5.SH NAME
6emacs \- GNU project Emacs
7.
8.
9.SH SYNOPSIS
10.B emacs
11[
12.I command-line switches
13] [
14.I files ...\&
15]
16.
17.
18.SH DESCRIPTION
19.I GNU Emacs
20is a version of
21.IR Emacs ,
22written by the author of the original (PDP-10)
23.IR Emacs ,
24Richard Stallman.
8fe7200c
CY
25The user functionality of GNU Emacs encompasses everything other
26editors do, and it is easily extensible since its editing commands are
27written in Lisp.
28.PP
cbe77461
GM
29The primary documentation of GNU Emacs is in the GNU Emacs Manual,
30which you can read using Info, either from Emacs or as a standalone
31program.
32Please look there for complete and up-to-date documentation.
8fe7200c 33This man page is updated only when someone volunteers to do so.
cbe77461
GM
34.PP
35.I Emacs
36has an extensive interactive help facility,
37but the facility assumes that you know how to manipulate
38.I Emacs
39windows and buffers.
40CTRL-h or F1 enters the Help facility.
8fe7200c 41Help Tutorial (CTRL-h t) starts an interactive tutorial to quickly
cbe77461 42teach beginners the fundamentals of
8fe7200c 43.I Emacs.
28edabd5
GM
44Help Apropos (CTRL-h a) helps you find a command with a name matching
45a given pattern, Help Key (CTRL-h k) describes a given key sequence,
46and Help Function (CTRL-h f) describes a given Lisp function.
cbe77461
GM
47.PP
48.IR "GNU Emacs" 's
49many special packages handle mail reading (RMail) and sending (Mail),
50outline editing (Outline), compiling (Compile), running subshells
51within
52.I Emacs
53windows (Shell), running a Lisp read-eval-print loop
54(Lisp-Interaction-Mode), automated psychotherapy (Doctor), and much more.
cbe77461
GM
55.
56.SS Emacs Options
57The following options are of general interest:
58.RS
59.TP 8
60.I file
61Edit
62.IR file .
63.TP
64.BI \-\-file " file\fR,\fP " \-\-find-file " file\fR,\fP " \-\-visit " file"
65The same as specifying
66.I file
67directly as an argument.
68.TP
69.BI + number
70Go to the line specified by
71.I number
72(do not insert a space between the "+" sign and
73the number).
74This applies only to the next file specified.
75.TP
76.BI + line:column
77Go to the specified
78.I line
79and
80.IR column .
81.TP
82.BR \-q ", " \-\-no\-init\-file
83Do not load an init file.
84.TP
85.B \-\-no\-site\-file
86Do not load the site-wide startup file.
87.TP
88.B \-\-no\-desktop
89Do not load a saved desktop.
90.TP
cbe77461 91.BR \-Q ", " \-\-quick
8fe7200c
CY
92Similar to "\-q \-\-no\-site\-file \-\-no\-splash". Also, avoid
93processing X resources.
cbe77461
GM
94.TP
95.B \-\-no\-splash
96Do not display a splash screen during start-up.
97.TP
98.B \-\-debug\-init
99Enable
100.I Emacs
101Lisp debugger during the processing of the user init file
102.BR ~/.emacs .
103This is useful for debugging problems in the init file.
104.TP
105.BI \-u " user\fR,\fP " \-\-user " user"
106Load
107.IR user 's
108init file.
109.TP
110.BI \-t " file\fR,\fP " \-\-terminal " file"
111Use specified
112.I file
113as the terminal instead of using stdin/stdout.
114This must be the first argument specified in the command line.
115.TP
8fe7200c
CY
116.B \-\-daemon
117Start Emacs as a daemon, enabling the Emacs server and disconnecting
118from the terminal. You can then use the emacsclient command to
119connect to the server (see
120.BR emacsclient (1)).
cbe77461
GM
121.TP
122.B \-\-version
123Display
124.I Emacs
125version information and exit.
126.TP
127.B \-\-help
128Display this help and exit.
129.RE
130.PP
8fe7200c 131The following options are Lisp-oriented
cbe77461
GM
132(these options are processed in the order encountered):
133.RS
134.TP 8
135.BI \-f " function\fR,\fP " \-\-funcall " function"
136Execute the lisp function
137.IR function .
138.TP
139.BI \-l " file\fR,\fP " \-\-load " file"
140Load the lisp code in the file
141.IR file .
142.TP
143.BI \-\-eval " expr\fR,\fP " \-\-execute " expr"
144Evaluate the Lisp expression
145.IR expr .
146.RE
147.PP
148The following options are useful when running
149.I Emacs
150as a batch editor:
151.RS
152.TP 8
153.B \-\-batch
154Edit in batch mode.
155The editor will send messages to stderr.
cbe77461
GM
156You must use \-l and \-f options to specify files to execute
157and functions to call.
158.TP
159.BI \-\-script " file"
160Run
161.I file
162as an Emacs Lisp script.
163.TP
164.BI \-\-insert " file"
165Insert contents of
166.I file
167into the current buffer.
168.TP
169.B \-\-kill
170Exit
171.I Emacs
172while in batch mode.
173.TP
174.BI \-L " dir\fR,\fP " \-\-directory " dir"
175Add
176.I dir
177to the list of directories
178.I Emacs
179searches for Lisp files.
180.RE
181.
182.\" START DELETING HERE IF YOU'RE NOT USING X
183.SS Using Emacs with X
184.I Emacs
185has been tailored to work well with the X window system.
186If you run
187.I Emacs
188from under X windows, it will create its own X window to
189display in.
190You will probably want to start the editor as a background
191process so that you can continue using your original window.
192.PP
193.I Emacs
194can be started with the following X switches:
195.RS
196.TP 8
197.BI \-\-name " name"
198Specify the name which should be assigned to the initial
199.I Emacs
200window.
201This controls looking up X resources as well as the window title.
202.TP
203.BI \-T " name\fR,\fP " \-\-title " name"
204Specify the title for the initial X window.
205.TP
206.BR \-r ", " \-rv ", " \-\-reverse\-video
207Display the
208.I Emacs
209window in reverse video.
210.TP
211.BI \-fn " font\fR,\fP " \-\-font " font"
212Set the
213.I Emacs
214window's font to that specified by
215.IR font .
216You will find the various
217.I X
218fonts in the
219.I /usr/lib/X11/fonts
220directory.
221Note that
222.I Emacs
223will only accept fixed width fonts.
224Under the X11 Release 4 font-naming conventions, any font with the
225value "m" or "c" in the eleventh field of the font name is a fixed
226width font.
227Furthermore, fonts whose name are of the form
228.IR width x height
229are generally fixed width, as is the font
230.IR fixed .
231See
232.BR xlsfonts (1)
233for more information.
234
235When you specify a font, be sure to put a space between the
236switch and the font name.
237.TP
238.BI \-\-xrm " resources"
239Set additional X resources.
240.TP
241.BI "\-\-color\fR,\fP \-\-color=" mode
242Override color mode for character terminals;
243.I mode
244defaults to `auto', and can also be `never', `auto', `always',
245or a mode name like `ansi8'.
246.TP
247.BI \-bw " pixels\fR,\fP " \-\-border\-width " pixels"
248Set the
249.I Emacs
250window's border width to the number of pixels specified by
251.IR pixels .
252Defaults to one pixel on each side of the window.
253.TP
254.BI \-ib " pixels\fR,\fP " \-\-internal\-border " pixels"
255Set the window's internal border width to the number of pixels specified
256by
257.IR pixels .
258Defaults to one pixel of padding on each side of the window.
259.TP
260.BI \-g " geometry\fR,\fP " \-\-geometry " geometry"
261Set the
262.I Emacs
263window's width, height, and position as specified.
264The geometry specification is in the standard X format; see
265.BR X (7)
266for more information.
267The width and height are specified in characters; the default is
26880 by 24.
269See the Emacs manual, section "Options for Window Size and Position",
270for information on how window sizes interact
271with selecting or deselecting the tool bar and menu bar.
272.TP
273.BI \-lsp " pixels\fR,\fP " \-\-line\-spacing " pixels"
274Additional space to put between lines.
275.TP
276.BR \-vb ", " \-\-vertical\-scroll\-bars
277Enable vertical scrollbars.
278.TP
279.BR \-fh ", " \-\-fullheight
280Make the first frame as high as the screen.
281.TP
282.BR \-fs ", " \-\-fullscreen
283Make the first frame fullscreen.
284.TP
285.BR \-fw ", " \-\-fullwidth
286Make the first frame as wide as the screen.
287.TP
8fe7200c
CY
288.BR \-mm ", " \-\-maximized
289Maximize the first frame, like "\-fw \-fh".
290.TP
cbe77461
GM
291.BI \-fg " color\fR,\fP " \-\-foreground\-color " color"
292On color displays, set the color of the text.
293
294Use the command
295.I M\-x list\-colors\-display
296for a list of valid color names.
297.TP
298.BI \-bg " color\fR,\fP " \-\-background\-color " color"
299On color displays, set the color of the window's background.
300.TP
301.BI \-bd " color\fR,\fP " \-\-border\-color " color"
302On color displays, set the color of the window's border.
303.TP
304.BI \-cr " color\fR,\fP " \-\-cursor\-color " color"
305On color displays, set the color of the window's text cursor.
306.TP
307.BI \-ms " color\fR,\fP " \-\-mouse\-color " color"
308On color displays, set the color of the window's mouse cursor.
309.TP
310.BI \-d " displayname\fR,\fP " \-\-display " displayname"
311Create the
312.I Emacs
313window on the display specified by
314.IR displayname .
315Must be the first option specified in the command line.
316.TP
317.BR \-nbi ", " \-\-no\-bitmap\-icon
318Do not use picture of gnu for Emacs icon.
319.TP
320.B \-\-iconic
321Start
322.I Emacs
323in iconified state.
324.TP
325.BR \-nbc ", " \-\-no\-blinking\-cursor
326Disable blinking cursor.
327.TP
328.BR \-nw ", " \-\-no\-window\-system
329Tell
330.I Emacs
8fe7200c 331not to create a graphical frame.
cbe77461
GM
332If you use this switch when invoking
333.I Emacs
334from an
335.BR xterm (1)
336window, display is done in that window.
337.TP
338.BR \-D ", " \-\-basic\-display
339This option disables many display features; use it for
340debugging Emacs.
341.RE
342.PP
343You can set
344.I X
345default values for your
346.I Emacs
347windows in your
348.I \.Xresources
349file (see
350.BR xrdb (1)).
351Use the following format:
352.IP
353.RI emacs. keyword : value
354.PP
355where
356.I value
357specifies the default value of
358.IR keyword .
359.I Emacs
360lets you set default values for the following keywords:
361.RS
362.TP 8
363.BR background " (class " Background )
364For color displays,
365sets the window's background color.
366.TP
367.BR bitmapIcon " (class " BitmapIcon )
368If
369.BR bitmapIcon 's
370value is set to
371.IR on ,
372the window will iconify into the "kitchen sink."
373.TP
374.BR borderColor " (class " BorderColor )
375For color displays,
376sets the color of the window's border.
377.TP
378.BR borderWidth " (class " BorderWidth )
379Sets the window's border width in pixels.
380.TP
381.BR cursorColor " (class " Foreground )
382For color displays,
383sets the color of the window's text cursor.
384.TP
385.BR cursorBlink " (class " CursorBlink )
386Specifies whether to make the cursor blink.
387The default is
388.IR on .
389Use
390.I off
391or
392.I false
393to turn cursor blinking off.
394.TP
395.BR font " (class " Font )
396Sets the window's text font.
397.TP
398.BR foreground " (class " Foreground )
399For color displays,
400sets the window's text color.
401.TP
402.BR fullscreen " (class " Fullscreen )
403The desired fullscreen size.
404The value can be one of
405.IR fullboth ,
4f558297 406.IR maximized ,
cbe77461
GM
407.IR fullwidth ,
408or
409.IR fullheight ,
0d26c1aa 410which correspond to the command-line options `\-fs', `\-mm', `\-fw',
4f558297 411and `\-fh', respectively.
cbe77461
GM
412Note that this applies to the initial frame only.
413.TP
414.BR geometry " (class " Geometry )
415Sets the geometry of the
416.I Emacs
417window (as described above).
418.TP
419.BR iconName " (class " Title )
420Sets the icon name for the
421.I Emacs
422window icon.
423.TP
424.BR internalBorder " (class " BorderWidth )
425Sets the window's internal border width in pixels.
426.TP
427.BR lineSpacing " (class " LineSpacing )
428Additional space ("leading") between lines, in pixels.
429.TP
430.BR menuBar " (class " MenuBar )
431Gives frames menu bars if
432.IR on ;
433don't have menu bars if
434.IR off .
435See the Emacs manual, sections "Lucid Resources" and "LessTif
436Resources", for how to control the appearance of the menu bar
437if you have one.
438.TP
439.BR minibuffer " (class " Minibuffer )
440If
441.IR none ,
442don't make a minibuffer in this frame.
443It will use a separate minibuffer frame instead.
444.TP
445.BR paneFont " (class " Font )
446Font name for menu pane titles, in non-toolkit versions of
447.IR Emacs .
448.TP
449.BR pointerColor " (class " Foreground )
450For color displays,
451sets the color of the window's mouse cursor.
452.TP
453.BR privateColormap " (class " PrivateColormap )
454If
455.IR on ,
456use a private color map, in the case where the "default
457visual" of class
458.B PseudoColor
459and
460.B Emacs
461is using it.
462.TP
463.BR reverseVideo " (class " ReverseVideo )
464If
465.BR reverseVideo 's
466value is set to
467.IR on ,
468the window will be displayed in reverse video.
469.TP
470.BR screenGamma " (class "ScreenGamma )
471Gamma correction for colors, equivalent to the frame parameter
472`screen\-gamma'.
473.TP
474.BR scrollBarWidth " (class "ScrollBarWidth )
475The scroll bar width in pixels, equivalent to the frame parameter
476`scroll\-bar\-width'.
477.TP
478.BR selectionFont " (class " SelectionFont )
479Font name for pop-up menu items, in non-toolkit versions of
480.IR Emacs .
481(For toolkit versions, see the Emacs manual, sections
482"Lucid Resources" and "LessTif Resources".)
483.TP
484.BR selectionTimeout " (class " SelectionTimeout )
485Number of milliseconds to wait for a selection reply.
486A value of 0 means wait as long as necessary.
487.TP
488.BR synchronous " (class " Synchronous )
489Run Emacs in synchronous mode if
490.IR on .
491Synchronous mode is useful for debugging X problems.
492.TP
493.BR title " (class " Title )
494Sets the title of the
495.I Emacs
496window.
497.TP
498.BR toolBar " (class " ToolBar )
499Number of lines to reserve for the tool bar.
500.TP
501.BR useXIM " (class " UseXIM )
502Turns off use of X input methods (XIM) if
503.I false
504or
505.IR off .
506.TP
507.BR verticalScrollBars " (class " ScrollBars )
508Gives frames scroll bars if
509.IR on ;
510suppresses scroll bars if
511.IR off .
512.TP
513.BR visualClass " (class " VisualClass )
514Specify the "visual" that X should use.
515This tells X how to handle colors.
516The value should start with one of
517.IR TrueColor ,
518.IR PseudoColor ,
519.IR DirectColor ,
520.IR StaticColor ,
521.IR GrayScale ,
522and
523.IR StaticGray ,
524followed by
525.BI \- depth\fR,\fP
526where
527.I depth
528is the number of color planes.
529.RE
cbe77461
GM
530.
531.SH MANUALS
532You can order printed copies of the GNU Emacs Manual from the Free
533Software Foundation, which develops GNU software.
28edabd5 534See the online store at <http://shop.fsf.org/>.
cbe77461 535.br
28edabd5 536Your local administrator might also have copies available.
cbe77461
GM
537As with all software and publications from FSF, everyone is permitted
538to make and distribute copies of the Emacs manual.
28edabd5 539The Texinfo source to the manual is also included in the Emacs source
cbe77461
GM
540distribution.
541.
542.
543.SH FILES
544/usr/local/share/info \(em files for the Info documentation browser.
545The complete text of the Emacs reference manual is included in a
546convenient tree structured form.
547Also includes the Emacs Lisp Reference Manual, useful to anyone
28edabd5
GM
548wishing to write programs in the Emacs Lisp extension language,
549and the Introduction to Programming in Emacs Lisp.
cbe77461
GM
550
551/usr/local/share/emacs/$VERSION/lisp \(em Lisp source files and
552compiled files that define most editing commands.
553Some are preloaded; others are autoloaded from this directory when
554used.
555
556/usr/local/libexec/emacs/$VERSION/$ARCH \(em various programs that are
557used with GNU Emacs.
558
559/usr/local/share/emacs/$VERSION/etc \(em various files of information.
560
561/usr/local/share/emacs/$VERSION/etc/DOC.* \(em contains the documentation
562strings for the Lisp primitives and preloaded Lisp functions
563of GNU Emacs.
564They are stored here to reduce the size of Emacs proper.
565
566/usr/local/share/emacs/$VERSION/etc/SERVICE lists people offering
567various services to assist users of GNU Emacs, including education,
568troubleshooting, porting and customization.
569.
570.
571.SH BUGS
572There is a mailing list, bug-gnu-emacs@gnu.org, for reporting Emacs
573bugs and fixes.
574But before reporting something as a bug, please try to be sure that
575it really is a bug, not a misunderstanding or a deliberate feature.
28edabd5
GM
576We ask you to read the section ``Reporting Bugs'' in the Emacs manual
577for hints on how and when to report bugs.
cbe77461
GM
578Also, include the version number of the Emacs you are running in
579\fIevery\fR bug report that you send in.
bdd8da91
GM
580Bugs tend actually to be fixed if they can be isolated, so it is
581in your interest to report them in such a way that they can be
582easily reproduced.
cbe77461
GM
583
584Do not expect a personal answer to a bug report.
585The purpose of reporting bugs is to get them fixed for everyone
586in the next release, if possible.
587For personal assistance, look in the SERVICE file (see above) for
588a list of people who offer it.
589
590Please do not send anything but bug reports to this mailing list.
591For more information about Emacs mailing lists, see the
bdd8da91 592file /usr/local/share/emacs/$VERSION/etc/MAILINGLISTS.
cbe77461
GM
593.
594.
595.SH UNRESTRICTIONS
596.I Emacs
597is free; anyone may redistribute copies of
598.I Emacs
a653652e 599to anyone under the terms stated in the GNU General Public License,
cbe77461
GM
600a copy of which accompanies each copy of
601.I Emacs
602and which also
603appears in the reference manual.
604.PP
605Copies of
606.I Emacs
607may sometimes be received packaged with distributions of Unix systems,
608but it is never included in the scope of any license covering those
609systems.
610Such inclusion violates the terms on which distribution is permitted.
a653652e 611In fact, the primary purpose of the GNU General Public License is to
cbe77461
GM
612prohibit anyone from attaching any other restrictions to
613redistribution of
614.IR Emacs .
615.PP
616Richard Stallman encourages you to improve and extend
617.IR Emacs ,
618and urges that
619you contribute your extensions to the GNU library.
620Eventually GNU (Gnu's Not Unix) will be a complete replacement
621for Unix.
622Everyone will be free to use, copy, study and change the GNU system.
623.
624.
625.SH SEE ALSO
626.BR emacsclient (1),
627.BR etags (1),
628.BR X (7),
629.BR xlsfonts (1),
630.BR xterm (1),
631.BR xrdb (1)
632.
633.
634.SH AUTHORS
635.I Emacs
636was written by Richard Stallman and the Free Software Foundation.
8fe7200c
CY
637For detailed credits and acknowledgements, see the GNU Emacs manual.
638.
cbe77461
GM
639.
640.
641.SH COPYING
642Copyright
643.if t \(co
644.if n (C)
7497ef13 6451995, 1999-2012 Free Software Foundation, Inc.
cbe77461
GM
646.PP
647Permission is granted to make and distribute verbatim copies of this
648document provided the copyright notice and this permission notice are
649preserved on all copies.
650.PP
651Permission is granted to copy and distribute modified versions of
652this document under the conditions for verbatim copying, provided that
653the entire resulting derived work is distributed under the terms of
654a permission notice identical to this one.
655.PP
656Permission is granted to copy and distribute translations of this
657document into another language, under the above conditions for
658modified versions, except that this permission notice may be stated
659in a translation approved by the Free Software Foundation.
660.