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