1EMACS(1)                    General Commands Manual                   EMACS(1)
2
3
4

NAME

6       emacs - GNU project Emacs
7

SYNOPSIS

9       emacs [ command-line switches ] [ files ... ]
10

DESCRIPTION

12       GNU  Emacs is a version of Emacs, written by the author of the original
13       (PDP-10) Emacs, Richard Stallman.
14       The primary documentation of GNU Emacs is  in  the  GNU  Emacs  Manual,
15       which  you  can  read  using Info, either from Emacs or as a standalone
16       program.  Please look there for complete and up-to-date  documentation.
17       This  man  page  is  updated only when someone volunteers to do so; the
18       Emacs maintainers' priority goal is to minimize the amount of time this
19       man page takes away from other more useful projects.
20       The  user functionality of GNU Emacs encompasses everything other Emacs
21       editors do, and it is easily extensible since its editing commands  are
22       written in Lisp.
23
24       Emacs  has  an  extensive  interactive  help facility, but the facility
25       assumes that you know how to  manipulate  Emacs  windows  and  buffers.
26       CTRL-h or F1 enters the Help facility.  Help Tutorial (CTRL-h t) starts
27       an interactive tutorial which can teach beginners the  fundamentals  of
28       Emacs  in a few minutes.  Help Apropos (CTRL-h a) helps you find a com‐
29       mand given its functionality, Help Character  (CTRL-h  c)  describes  a
30       given  character's  effect,  and  Help  Function (CTRL-h f) describes a
31       given Lisp function specified by name.
32
33       Emacs's Undo can undo several steps of modification to your buffers, so
34       it is easy to recover from editing mistakes.
35
36       GNU Emacs's many special packages handle mail reading (RMail) and send‐
37       ing (Mail), outline editing  (Outline),  compiling  (Compile),  running
38       subshells  within Emacs windows (Shell), running a Lisp read-eval-print
39       loop (Lisp-Interaction-Mode),  automated  psychotherapy  (Doctor),  and
40       much more.
41
42       There  is  an  extensive  reference  manual, but users of other Emacses
43       should have little trouble adapting even without a copy.  Users new  to
44       Emacs will be able to use basic features fairly rapidly by studying the
45       tutorial and using the self-documentation features.
46
47   Emacs Options
48       The following options are of general interest:
49
50              file    Edit file.
51
52              --file file, --find-file file, --visit file
53                      The same as specifying file directly as an argument.
54
55              +number Go to the line specified by  number  (do  not  insert  a
56                      space  between  the  "+"  sign  and  the  number).  This
57                      applies only to the next file specified.
58
59              +line:column
60                      Go to the specified line and column.
61
62              -q, --no-init-file
63                      Do not load an init file.
64
65              --no-site-file
66                      Do not load the site-wide startup file.
67
68              --no-desktop
69                      Do not load a saved desktop.
70
71              -nl, --no-shared-memory
72                      Do not use shared memory.
73
74              -Q, --quick
75                      Equivalent to "-q --no-site-file --no-splash".
76
77              --no-splash
78                      Do not display a splash screen during start-up.
79
80              --debug-init
81                      Enable Emacs Lisp debugger during the processing of  the
82                      user  init  file ~/.emacs.  This is useful for debugging
83                      problems in the init file.
84
85              -u user, --user user
86                      Load user's init file.
87
88              -t file, --terminal file
89                      Use specified file as  the  terminal  instead  of  using
90                      stdin/stdout.  This must be the first argument specified
91                      in the command line.
92
93              --multibyte, --no-unibyte
94                      Enable multibyte mode (enabled by default).
95
96              --unibyte, --no-multibyte
97                      Enable unibyte mode.
98
99              --version
100                      Display Emacs version information and exit.
101
102              --help  Display this help and exit.
103
104       The following options are lisp-oriented (these options are processed in
105       the order encountered):
106
107              -f function, --funcall function
108                      Execute the lisp function function.
109
110              -l file, --load file
111                      Load the lisp code in the file file.
112
113              --eval expr, --execute expr
114                      Evaluate the Lisp expression expr.
115
116       The following options are useful when running Emacs as a batch editor:
117
118              --batch Edit  in  batch  mode.  The editor will send messages to
119                      stderr.  This option must be the first in  the  argument
120                      list.   You  must use -l and -f options to specify files
121                      to execute and functions to call.
122
123              --script file
124                      Run file as an Emacs Lisp script.
125
126              --insert file
127                      Insert contents of file into the current buffer.
128
129              --kill  Exit Emacs while in batch mode.
130
131              -L dir, --directory dir
132                      Add dir to the list of directories  Emacs  searches  for
133                      Lisp files.
134
135   Using Emacs with X
136       Emacs  has been tailored to work well with the X window system.  If you
137       run Emacs from under X windows, it will create its own X window to dis‐
138       play  in.   You  will probably want to start the editor as a background
139       process so that you can continue using your original window.
140
141       Emacs can be started with the following X switches:
142
143              --name name
144                      Specify the name which should be assigned to the initial
145                      Emacs  window.   This controls looking up X resources as
146                      well as the window title.
147
148              -T name, --title name
149                      Specify the title for the initial X window.
150
151              -r, -rv, --reverse-video
152                      Display the Emacs window in reverse video.
153
154              -fn font, --font font
155                      Set the Emacs window's font to that specified  by  font.
156                      You   will   find   the   various   X   fonts   in   the
157                      /usr/lib/X11/fonts directory.  Note that Emacs will only
158                      accept fixed width fonts.  Under the X11 Release 4 font-
159                      naming conventions, any font with the value "m"  or  "c"
160                      in  the eleventh field of the font name is a fixed width
161                      font.  Furthermore, fonts whose name  are  of  the  form
162                      widthxheight  are  generally fixed width, as is the font
163                      fixed.  See xlsfonts(1) for more information.
164
165                      When you specify a font, be sure to put a space  between
166                      the switch and the font name.
167
168              --xrm resources
169                      Set additional X resources.
170
171              --color, --color=mode
172                      Override   color  mode  for  character  terminals;  mode
173                      defaults to `auto', and can  also  be  `never',  `auto',
174                      `always', or a mode name like `ansi8'.
175
176              -bw pixels, --border-width pixels
177                      Set  the  Emacs  window's  border width to the number of
178                      pixels specified by pixels.  Defaults to  one  pixel  on
179                      each side of the window.
180
181              -ib pixels, --internal-border pixels
182                      Set  the window's internal border width to the number of
183                      pixels specified by pixels.  Defaults to  one  pixel  of
184                      padding on each side of the window.
185
186              -g geometry, --geometry geometry
187                      Set  the  Emacs  window's width, height, and position as
188                      specified.  The geometry specification is in  the  stan‐
189                      dard X format; see X(7) for more information.  The width
190                      and height are specified in characters; the  default  is
191                      80  by  24.   See the Emacs manual, section "Options for
192                      Window Size and Position", for information on how window
193                      sizes  interact  with  selecting or deselecting the tool
194                      bar and menu bar.
195
196              -lsp pixels, --line-spacing pixels
197                      Additional space to put between lines.
198
199              -vb, --vertical-scroll-bars
200                      Enable vertical scrollbars.
201
202              -fh, --fullheight
203                      Make the first frame as high as the screen.
204
205              -fs, --fullscreen
206                      Make the first frame fullscreen.
207
208              -fw, --fullwidth
209                      Make the first frame as wide as the screen.
210
211              -fg color, --foreground-color color
212                      On color displays, set the color of the text.
213
214                      Use the command M-x list-colors-display for  a  list  of
215                      valid color names.
216
217              -bg color, --background-color color
218                      On  color  displays, set the color of the window's back‐
219                      ground.
220
221              -bd color, --border-color color
222                      On color displays, set the color of the window's border.
223
224              -cr color, --cursor-color color
225                      On color displays, set the color of  the  window's  text
226                      cursor.
227
228              -ms color, --mouse-color color
229                      On  color  displays, set the color of the window's mouse
230                      cursor.
231
232              -d displayname, --display displayname
233                      Create the Emacs window on the display specified by dis‐
234                      playname.   Must  be  the  first option specified in the
235                      command line.
236
237              -nbi, --no-bitmap-icon
238                      Do not use picture of gnu for Emacs icon.
239
240              --iconic
241                      Start Emacs in iconified state.
242
243              -nbc, --no-blinking-cursor
244                      Disable blinking cursor.
245
246              -nw, --no-window-system
247                      Tell Emacs not to use its special interface  to  X.   If
248                      you use this switch when invoking Emacs from an xterm(1)
249                      window, display is done in that window.
250
251              -D, --basic-display
252                      This option disables many display features; use  it  for
253                      debugging Emacs.
254
255       You can set X default values for your Emacs windows in your .Xresources
256       file (see xrdb(1)).  Use the following format:
257
258              emacs.keyword:value
259
260       where value specifies the default value of keyword.  Emacs lets you set
261       default values for the following keywords:
262
263              background (class Background)
264                      For color displays, sets the window's background color.
265
266              bitmapIcon (class BitmapIcon)
267                      If  bitmapIcon's  value  is  set  to on, the window will
268                      iconify into the "kitchen sink."
269
270              borderColor (class BorderColor)
271                      For color displays, sets the color of the window's  bor‐
272                      der.
273
274              borderWidth (class BorderWidth)
275                      Sets the window's border width in pixels.
276
277              cursorColor (class Foreground)
278                      For  color displays, sets the color of the window's text
279                      cursor.
280
281              cursorBlink (class CursorBlink)
282                      Specifies whether to make the cursor blink.  The default
283                      is on.  Use off or false to turn cursor blinking off.
284
285              font (class Font)
286                      Sets the window's text font.
287
288              foreground (class Foreground)
289                      For color displays, sets the window's text color.
290
291              fullscreen (class Fullscreen)
292                      The  desired  fullscreen  size.  The value can be one of
293                      fullboth, fullwidth, or fullheight, which correspond  to
294                      the   command-line  options  `-fs',  `-fw',  and  `-fh',
295                      respectively.  Note that this  applies  to  the  initial
296                      frame only.
297
298              geometry (class Geometry)
299                      Sets  the  geometry  of  the  Emacs window (as described
300                      above).
301
302              iconName (class Title)
303                      Sets the icon name for the Emacs window icon.
304
305              internalBorder (class BorderWidth)
306                      Sets the window's internal border width in pixels.
307
308              lineSpacing (class LineSpacing)
309                      Additional space ("leading") between lines, in pixels.
310
311              menuBar (class MenuBar)
312                      Gives frames menu bars if on; don't have  menu  bars  if
313                      off.   See  the Emacs manual, sections "Lucid Resources"
314                      and "LessTif Resources", for how to control the  appear‐
315                      ance of the menu bar if you have one.
316
317              minibuffer (class Minibuffer)
318                      If none, don't make a minibuffer in this frame.  It will
319                      use a separate minibuffer frame instead.
320
321              paneFont (class Font)
322                      Font name for menu pane titles, in non-toolkit  versions
323                      of Emacs.
324
325              pointerColor (class Foreground)
326                      For color displays, sets the color of the window's mouse
327                      cursor.
328
329              privateColormap (class PrivateColormap)
330                      If on, use a private color map, in the  case  where  the
331                      "default visual" of class PseudoColor and Emacs is using
332                      it.
333
334              reverseVideo (class ReverseVideo)
335                      If reverseVideo's value is set to on, the window will be
336                      displayed in reverse video.
337
338              screenGamma (class ScreenGamma)
339                      Gamma  correction  for  colors,  equivalent to the frame
340                      parameter `screen-gamma'.
341
342              scrollBarWidth (class ScrollBarWidth)
343                      The scroll bar width in pixels, equivalent to the  frame
344                      parameter `scroll-bar-width'.
345
346              selectionFont (class SelectionFont)
347                      Font name for pop-up menu items, in non-toolkit versions
348                      of Emacs.  (For toolkit versions, see the Emacs  manual,
349                      sections "Lucid Resources" and "LessTif Resources".)
350
351              selectionTimeout (class SelectionTimeout)
352                      Number of milliseconds to wait for a selection reply.  A
353                      value of 0 means wait as long as necessary.
354
355              synchronous (class Synchronous)
356                      Run Emacs in synchronous mode if on.   Synchronous  mode
357                      is useful for debugging X problems.
358
359              title (class Title)
360                      Sets the title of the Emacs window.
361
362              toolBar (class ToolBar)
363                      Number of lines to reserve for the tool bar.
364
365              useXIM (class UseXIM)
366                      Turns off use of X input methods (XIM) if false or off.
367
368              verticalScrollBars (class ScrollBars)
369                      Gives  frames  scroll bars if on; suppresses scroll bars
370                      if off.
371
372              visualClass (class VisualClass)
373                      Specify the "visual" that X should use.   This  tells  X
374                      how  to  handle colors.  The value should start with one
375                      of  TrueColor,  PseudoColor,  DirectColor,  StaticColor,
376                      GrayScale,  and  StaticGray,  followed  by -depth, where
377                      depth is the number of color planes.
378
379       If you try to set color values while using a black and  white  display,
380       the  window's  characteristics  will default as follows: the foreground
381       color will be set to black, the background color will be set to  white,
382       the  border  color  will be set to grey, and the text and mouse cursors
383       will be set to black.
384
385   Using the Mouse
386       The following lists some of the mouse button  bindings  for  the  Emacs
387       window under X11.
388
389              MOUSE BUTTON        FUNCTION
390              ────────────────────────────────────────────────────────────
391              left                Set point.
392              middle              Paste text.
393              right               Cut text into X cut buffer.
394              SHIFT-middle        Cut text into X cut buffer.
395              SHIFT-right         Paste text.
396              CTRL-middle         Cut text into X cut buffer and kill it.
397              CTRL-right          Select  this window, then split it into
398                                  two windows.  Same as typing CTRL-x 2.
399              CTRL-SHIFT-left     X buffer menu — hold  the  buttons  and
400                                  keys  down,  wait  for  menu to appear,
401                                  select buffer, and release.  Move mouse
402                                  out of menu and release to cancel.
403
404
405              CTRL-SHIFT-middle   X  help  menu  — pop up index card menu
406                                  for Emacs help.
407              CTRL-SHIFT-right    Select window with  mouse,  and  delete
408                                  all  other  windows.   Same  as  typing
409                                  CTRL-x 1.
410

MANUALS

412       You can order printed copies of the GNU  Emacs  Manual  from  the  Free
413       Software  Foundation, which develops GNU software.  See the file ORDERS
414       for ordering information.
415       Your local Emacs maintainer might also have copies available.  As  with
416       all  software  and publications from FSF, everyone is permitted to make
417       and distribute copies of the Emacs manual.  The TeX source to the  man‐
418       ual is also included in the Emacs source distribution.
419

FILES

421       /usr/local/share/info  — files for the Info documentation browser.  The
422       complete text of the Emacs reference manual is included in a convenient
423       tree  structured  form.  Also includes the Emacs Lisp Reference Manual,
424       useful to anyone wishing to write programs in the Emacs Lisp  extension
425       language.
426
427       /usr/local/share/emacs/$VERSION/lisp  —  Lisp source files and compiled
428       files that define most editing commands.  Some  are  preloaded;  others
429       are autoloaded from this directory when used.
430
431       /usr/local/libexec/emacs/$VERSION/$ARCH  —  various  programs  that are
432       used with GNU Emacs.
433
434       /usr/local/share/emacs/$VERSION/etc — various files of information.
435
436       /usr/local/share/emacs/$VERSION/etc/DOC.* — contains the  documentation
437       strings  for  the  Lisp  primitives and preloaded Lisp functions of GNU
438       Emacs.  They are stored here to reduce the size of Emacs proper.
439
440       /usr/local/share/emacs/$VERSION/etc/SERVICE lists people offering vari‐
441       ous  services  to assist users of GNU Emacs, including education, trou‐
442       bleshooting, porting and customization.
443

BUGS

445       There is a mailing list,  bug-gnu-emacs@gnu.org,  for  reporting  Emacs
446       bugs and fixes.  But before reporting something as a bug, please try to
447       be sure that it really is a bug, not a misunderstanding or a deliberate
448       feature.   We ask you to read the section ``Reporting Emacs Bugs'' near
449       the end of the reference manual (or Info system) for hints on  how  and
450       when to report bugs.  Also, include the version number of the Emacs you
451       are running in every bug report that you send in.  Bugs  tend  actually
452       to  be  fixed  if  they  can  be isolated, so it is in your interest to
453       report them in such a way that they can be easily reproduced.
454
455       Do not expect a personal answer  to  a  bug  report.   The  purpose  of
456       reporting  bugs  is to get them fixed for everyone in the next release,
457       if possible.  For personal assistance, look in the  SERVICE  file  (see
458       above) for a list of people who offer it.
459
460       Please  do not send anything but bug reports to this mailing list.  For
461       more  information   about   Emacs   mailing   lists,   see   the   file
462       /usr/local/share/emacs/$VERSION/etc/MAILINGLISTS.
463

UNRESTRICTIONS

465       Emacs  is free; anyone may redistribute copies of Emacs to anyone under
466       the terms stated in the Emacs General Public License, a copy  of  which
467       accompanies  each copy of Emacs and which also appears in the reference
468       manual.
469
470       Copies of Emacs may sometimes be received packaged  with  distributions
471       of  Unix  systems, but it is never included in the scope of any license
472       covering those systems.  Such inclusion violates  the  terms  on  which
473       distribution is permitted.  In fact, the primary purpose of the General
474       Public License is to prohibit anyone from attaching any other  restric‐
475       tions to redistribution of Emacs.
476
477       Richard  Stallman encourages you to improve and extend Emacs, and urges
478       that you contribute your extensions to the GNU library.  Eventually GNU
479       (Gnu's  Not  Unix)  will  be a complete replacement for Unix.  Everyone
480       will be free to use, copy, study and change the GNU system.
481

SEE ALSO

483       emacsclient(1), etags(1), X(7), xlsfonts(1), xterm(1), xrdb(1)
484

AUTHORS

486       Emacs was written by Richard Stallman and the Free Software Foundation.
487       Joachim Martillo and Robert Krawitz added the X features.
488

COPYING

490       Copyright (C) 1995, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
491             2006, 2007, 2008, 2009 Free Software Foundation, Inc.
492
493       Permission  is  granted  to make and distribute verbatim copies of this
494       document provided the copyright notice and this permission  notice  are
495       preserved on all copies.
496
497       Permission  is granted to copy and distribute modified versions of this
498       document under the conditions for verbatim copying, provided  that  the
499       entire  resulting derived work is distributed under the terms of a per‐
500       mission notice identical to this one.
501
502       Permission is granted to copy and distribute translations of this docu‐
503       ment  into  another  language,  under the above conditions for modified
504       versions, except that this permission notice may be stated in a  trans‐
505       lation approved by the Free Software Foundation.
506
507
508
509GNU Emacs 23.1                   2007 April 13                        EMACS(1)
Impressum