1EMACS(1) General Commands Manual EMACS(1)
2
3
4
6 emacs - GNU project Emacs
7
9 emacs [ command-line switches ] [ files ... ]
10
12 GNU Emacs is a version of Emacs, written by the author of the original
13 (PDP-10) Emacs, Richard Stallman. The user functionality of GNU Emacs
14 encompasses everything other editors do, and it is easily extensible
15 since its editing commands are written in Lisp.
16
17 The primary documentation of GNU Emacs is in the GNU Emacs Manual,
18 which you can read using Info, either from Emacs or as a standalone
19 program. Please look there for complete and up-to-date documentation.
20 This man page is updated only when someone volunteers to do so.
21
22 Emacs has an extensive interactive help facility, but the facility
23 assumes that you know how to manipulate Emacs windows and buffers.
24 CTRL-h or F1 enters the Help facility. Help Tutorial (CTRL-h t) starts
25 an interactive tutorial to quickly teach beginners the fundamentals of
26 Emacs. Help Apropos (CTRL-h a) helps you find a command given its
27 functionality, Help Key (CTRL-h k) describes a given key sequence, and
28 Help Function (CTRL-h f) describes a given Lisp function.
29
30 GNU Emacs's many special packages handle mail reading (RMail) and send‐
31 ing (Mail), outline editing (Outline), compiling (Compile), running
32 subshells within Emacs windows (Shell), running a Lisp read-eval-print
33 loop (Lisp-Interaction-Mode), automated psychotherapy (Doctor), and
34 much more.
35
36 Emacs Options
37 The following options are of general interest:
38
39 file Edit file.
40
41 --file file, --find-file file, --visit file
42 The same as specifying file directly as an argument.
43
44 +number Go to the line specified by number (do not insert a
45 space between the "+" sign and the number). This
46 applies only to the next file specified.
47
48 +line:column
49 Go to the specified line and column.
50
51 -q, --no-init-file
52 Do not load an init file.
53
54 --no-site-file
55 Do not load the site-wide startup file.
56
57 --no-desktop
58 Do not load a saved desktop.
59
60 -Q, --quick
61 Similar to "-q --no-site-file --no-splash". Also, avoid
62 processing X resources.
63
64 --no-splash
65 Do not display a splash screen during start-up.
66
67 --debug-init
68 Enable Emacs Lisp debugger during the processing of the
69 user init file ~/.emacs. This is useful for debugging
70 problems in the init file.
71
72 -u user, --user user
73 Load user's init file.
74
75 -t file, --terminal file
76 Use specified file as the terminal instead of using
77 stdin/stdout. This must be the first argument specified
78 in the command line.
79
80 --daemon
81 Start Emacs as a daemon, enabling the Emacs server and
82 disconnecting from the terminal. You can then use the
83 emacsclient command to connect to the server (see emac‐
84 sclient(1)).
85
86 --version
87 Display Emacs version information and exit.
88
89 --help Display this help and exit.
90
91 The following options are Lisp-oriented (these options are processed in
92 the order encountered):
93
94 -f function, --funcall function
95 Execute the lisp function function.
96
97 -l file, --load file
98 Load the lisp code in the file file.
99
100 --eval expr, --execute expr
101 Evaluate the Lisp expression expr.
102
103 The following options are useful when running Emacs as a batch editor:
104
105 --batch Edit in batch mode. The editor will send messages to
106 stderr. You must use -l and -f options to specify files
107 to execute and functions to call.
108
109 --script file
110 Run file as an Emacs Lisp script.
111
112 --insert file
113 Insert contents of file into the current buffer.
114
115 --kill Exit Emacs while in batch mode.
116
117 -L dir, --directory dir
118 Add dir to the list of directories Emacs searches for
119 Lisp files.
120
121 Using Emacs with X
122 Emacs has been tailored to work well with the X window system. If you
123 run Emacs from under X windows, it will create its own X window to dis‐
124 play in. You will probably want to start the editor as a background
125 process so that you can continue using your original window.
126
127 Emacs can be started with the following X switches:
128
129 --name name
130 Specify the name which should be assigned to the initial
131 Emacs window. This controls looking up X resources as
132 well as the window title.
133
134 -T name, --title name
135 Specify the title for the initial X window.
136
137 -r, -rv, --reverse-video
138 Display the Emacs window in reverse video.
139
140 -fn font, --font font
141 Set the Emacs window's font to that specified by font.
142 You will find the various X fonts in the
143 /usr/lib/X11/fonts directory. Note that Emacs will only
144 accept fixed width fonts. Under the X11 Release 4 font-
145 naming conventions, any font with the value "m" or "c"
146 in the eleventh field of the font name is a fixed width
147 font. Furthermore, fonts whose name are of the form
148 widthxheight are generally fixed width, as is the font
149 fixed. See xlsfonts(1) for more information.
150
151 When you specify a font, be sure to put a space between
152 the switch and the font name.
153
154 --xrm resources
155 Set additional X resources.
156
157 --color, --color=mode
158 Override color mode for character terminals; mode
159 defaults to `auto', and can also be `never', `auto',
160 `always', or a mode name like `ansi8'.
161
162 -bw pixels, --border-width pixels
163 Set the Emacs window's border width to the number of
164 pixels specified by pixels. Defaults to one pixel on
165 each side of the window.
166
167 -ib pixels, --internal-border pixels
168 Set the window's internal border width to the number of
169 pixels specified by pixels. Defaults to one pixel of
170 padding on each side of the window.
171
172 -g geometry, --geometry geometry
173 Set the Emacs window's width, height, and position as
174 specified. The geometry specification is in the stan‐
175 dard X format; see X(7) for more information. The width
176 and height are specified in characters; the default is
177 80 by 24. See the Emacs manual, section "Options for
178 Window Size and Position", for information on how window
179 sizes interact with selecting or deselecting the tool
180 bar and menu bar.
181
182 -lsp pixels, --line-spacing pixels
183 Additional space to put between lines.
184
185 -vb, --vertical-scroll-bars
186 Enable vertical scrollbars.
187
188 -fh, --fullheight
189 Make the first frame as high as the screen.
190
191 -fs, --fullscreen
192 Make the first frame fullscreen.
193
194 -fw, --fullwidth
195 Make the first frame as wide as the screen.
196
197 -mm, --maximized
198 Maximize the first frame, like "-fw -fh".
199
200 -fg color, --foreground-color color
201 On color displays, set the color of the text.
202
203 Use the command M-x list-colors-display for a list of
204 valid color names.
205
206 -bg color, --background-color color
207 On color displays, set the color of the window's back‐
208 ground.
209
210 -bd color, --border-color color
211 On color displays, set the color of the window's border.
212
213 -cr color, --cursor-color color
214 On color displays, set the color of the window's text
215 cursor.
216
217 -ms color, --mouse-color color
218 On color displays, set the color of the window's mouse
219 cursor.
220
221 -d displayname, --display displayname
222 Create the Emacs window on the display specified by dis‐
223 playname. Must be the first option specified in the
224 command line.
225
226 -nbi, --no-bitmap-icon
227 Do not use picture of gnu for Emacs icon.
228
229 --iconic
230 Start Emacs in iconified state.
231
232 -nbc, --no-blinking-cursor
233 Disable blinking cursor.
234
235 -nw, --no-window-system
236 Tell Emacs not to create a graphical frame. If you use
237 this switch when invoking Emacs from an xterm(1) window,
238 display is done in that window.
239
240 -D, --basic-display
241 This option disables many display features; use it for
242 debugging Emacs.
243
244 You can set X default values for your Emacs windows in your .Xresources
245 file (see xrdb(1)). Use the following format:
246
247 emacs.keyword:value
248
249 where value specifies the default value of keyword. Emacs lets you set
250 default values for the following keywords:
251
252 background (class Background)
253 For color displays, sets the window's background color.
254
255 bitmapIcon (class BitmapIcon)
256 If bitmapIcon's value is set to on, the window will
257 iconify into the "kitchen sink."
258
259 borderColor (class BorderColor)
260 For color displays, sets the color of the window's bor‐
261 der.
262
263 borderWidth (class BorderWidth)
264 Sets the window's border width in pixels.
265
266 cursorColor (class Foreground)
267 For color displays, sets the color of the window's text
268 cursor.
269
270 cursorBlink (class CursorBlink)
271 Specifies whether to make the cursor blink. The default
272 is on. Use off or false to turn cursor blinking off.
273
274 font (class Font)
275 Sets the window's text font.
276
277 foreground (class Foreground)
278 For color displays, sets the window's text color.
279
280 fullscreen (class Fullscreen)
281 The desired fullscreen size. The value can be one of
282 fullboth, fullwidth, or fullheight, which correspond to
283 the command-line options `-fs', `-fw', and `-fh',
284 respectively. Note that this applies to the initial
285 frame only.
286
287 geometry (class Geometry)
288 Sets the geometry of the Emacs window (as described
289 above).
290
291 iconName (class Title)
292 Sets the icon name for the Emacs window icon.
293
294 internalBorder (class BorderWidth)
295 Sets the window's internal border width in pixels.
296
297 lineSpacing (class LineSpacing)
298 Additional space ("leading") between lines, in pixels.
299
300 menuBar (class MenuBar)
301 Gives frames menu bars if on; don't have menu bars if
302 off. See the Emacs manual, sections "Lucid Resources"
303 and "LessTif Resources", for how to control the appear‐
304 ance of the menu bar if you have one.
305
306 minibuffer (class Minibuffer)
307 If none, don't make a minibuffer in this frame. It will
308 use a separate minibuffer frame instead.
309
310 paneFont (class Font)
311 Font name for menu pane titles, in non-toolkit versions
312 of Emacs.
313
314 pointerColor (class Foreground)
315 For color displays, sets the color of the window's mouse
316 cursor.
317
318 privateColormap (class PrivateColormap)
319 If on, use a private color map, in the case where the
320 "default visual" of class PseudoColor and Emacs is using
321 it.
322
323 reverseVideo (class ReverseVideo)
324 If reverseVideo's value is set to on, the window will be
325 displayed in reverse video.
326
327 screenGamma (class ScreenGamma)
328 Gamma correction for colors, equivalent to the frame
329 parameter `screen-gamma'.
330
331 scrollBarWidth (class ScrollBarWidth)
332 The scroll bar width in pixels, equivalent to the frame
333 parameter `scroll-bar-width'.
334
335 selectionFont (class SelectionFont)
336 Font name for pop-up menu items, in non-toolkit versions
337 of Emacs. (For toolkit versions, see the Emacs manual,
338 sections "Lucid Resources" and "LessTif Resources".)
339
340 selectionTimeout (class SelectionTimeout)
341 Number of milliseconds to wait for a selection reply. A
342 value of 0 means wait as long as necessary.
343
344 synchronous (class Synchronous)
345 Run Emacs in synchronous mode if on. Synchronous mode
346 is useful for debugging X problems.
347
348 title (class Title)
349 Sets the title of the Emacs window.
350
351 toolBar (class ToolBar)
352 Number of lines to reserve for the tool bar.
353
354 useXIM (class UseXIM)
355 Turns off use of X input methods (XIM) if false or off.
356
357 verticalScrollBars (class ScrollBars)
358 Gives frames scroll bars if on; suppresses scroll bars
359 if off.
360
361 visualClass (class VisualClass)
362 Specify the "visual" that X should use. This tells X
363 how to handle colors. The value should start with one
364 of TrueColor, PseudoColor, DirectColor, StaticColor,
365 GrayScale, and StaticGray, followed by -depth, where
366 depth is the number of color planes.
367
369 You can order printed copies of the GNU Emacs Manual from the Free
370 Software Foundation, which develops GNU software. See the file ORDERS
371 for ordering information.
372 Your local Emacs maintainer might also have copies available. As with
373 all software and publications from FSF, everyone is permitted to make
374 and distribute copies of the Emacs manual. The TeX source to the man‐
375 ual is also included in the Emacs source distribution.
376
378 /usr/local/share/info — files for the Info documentation browser. The
379 complete text of the Emacs reference manual is included in a convenient
380 tree structured form. Also includes the Emacs Lisp Reference Manual,
381 useful to anyone wishing to write programs in the Emacs Lisp extension
382 language.
383
384 /usr/local/share/emacs/$VERSION/lisp — Lisp source files and compiled
385 files that define most editing commands. Some are preloaded; others
386 are autoloaded from this directory when used.
387
388 /usr/local/libexec/emacs/$VERSION/$ARCH — various programs that are
389 used with GNU Emacs.
390
391 /usr/local/share/emacs/$VERSION/etc — various files of information.
392
393 /usr/local/share/emacs/$VERSION/etc/DOC.* — contains the documentation
394 strings for the Lisp primitives and preloaded Lisp functions of GNU
395 Emacs. They are stored here to reduce the size of Emacs proper.
396
397 /usr/local/share/emacs/$VERSION/etc/SERVICE lists people offering vari‐
398 ous services to assist users of GNU Emacs, including education, trou‐
399 bleshooting, porting and customization.
400
402 There is a mailing list, bug-gnu-emacs@gnu.org, for reporting Emacs
403 bugs and fixes. But before reporting something as a bug, please try to
404 be sure that it really is a bug, not a misunderstanding or a deliberate
405 feature. We ask you to read the section ``Reporting Emacs Bugs'' near
406 the end of the reference manual (or Info system) for hints on how and
407 when to report bugs. Also, include the version number of the Emacs you
408 are running in every bug report that you send in. Bugs tend actually
409 to be fixed if they can be isolated, so it is in your interest to
410 report them in such a way that they can be easily reproduced.
411
412 Do not expect a personal answer to a bug report. The purpose of
413 reporting bugs is to get them fixed for everyone in the next release,
414 if possible. For personal assistance, look in the SERVICE file (see
415 above) for a list of people who offer it.
416
417 Please do not send anything but bug reports to this mailing list. For
418 more information about Emacs mailing lists, see the file
419 /usr/local/share/emacs/$VERSION/etc/MAILINGLISTS.
420
422 Emacs is free; anyone may redistribute copies of Emacs to anyone under
423 the terms stated in the Emacs General Public License, a copy of which
424 accompanies each copy of Emacs and which also appears in the reference
425 manual.
426
427 Copies of Emacs may sometimes be received packaged with distributions
428 of Unix systems, but it is never included in the scope of any license
429 covering those systems. Such inclusion violates the terms on which
430 distribution is permitted. In fact, the primary purpose of the General
431 Public License is to prohibit anyone from attaching any other restric‐
432 tions to redistribution of Emacs.
433
434 Richard Stallman encourages you to improve and extend Emacs, and urges
435 that you contribute your extensions to the GNU library. Eventually GNU
436 (Gnu's Not Unix) will be a complete replacement for Unix. Everyone
437 will be free to use, copy, study and change the GNU system.
438
440 emacsclient(1), etags(1), X(7), xlsfonts(1), xterm(1), xrdb(1)
441
443 Emacs was written by Richard Stallman and the Free Software Foundation.
444 For detailed credits and acknowledgements, see the GNU Emacs manual.
445
447 Copyright (C) 1995, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
448 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
449
450 Permission is granted to make and distribute verbatim copies of this
451 document provided the copyright notice and this permission notice are
452 preserved on all copies.
453
454 Permission is granted to copy and distribute modified versions of this
455 document under the conditions for verbatim copying, provided that the
456 entire resulting derived work is distributed under the terms of a per‐
457 mission notice identical to this one.
458
459 Permission is granted to copy and distribute translations of this docu‐
460 ment into another language, under the above conditions for modified
461 versions, except that this permission notice may be stated in a trans‐
462 lation approved by the Free Software Foundation.
463
464
465
466GNU Emacs 23.2 2007 April 13 EMACS(1)