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
49       The following options are of general interest:
50
51       file    Edit file.
52
53       +number Go to the line specified by  number  (do  not  insert  a  space
54               between the "+" sign and the number).  This applies only to the
55               next file specified.
56
57       +line:column
58               Go to the specified line and column
59
60       -q      Do not load an init file.
61
62       -no-site-file
63               Do not load the site-wide startup file.
64
65       -debug-init
66               Enable Emacs Lisp debugger during the processing  of  the  user
67               init  file  ~/.emacs.  This is useful for debugging problems in
68               the init file.
69
70       -u user Load user's init file.
71
72       -t file Use specified file as the terminal instead of using  stdin/std‐
73               out.   This must be the first argument specified in the command
74               line.
75
76       -version
77               Display Emacs version information and exit.
78
79       The following options are lisp-oriented (these options are processed in
80       the order encountered):
81
82       -f function
83               Execute the lisp function function.
84
85       -l file Load the lisp code in the file file.
86
87       -eval expr
88               Evaluate the Lisp expression expr.
89
90       The following options are useful when running Emacs as a batch editor:
91
92       -batch  Edit  in  batch mode.  The editor will send messages to stderr.
93               This option must be the first in the argument list.   You  must
94               use -l and -f options to specify files to execute and functions
95               to call.
96
97       -kill   Exit Emacs while in batch mode.
98
99       -L directory
100               Add directory to the list of  directories  Emacs  searches  for
101               Lisp files.
102
103       Using Emacs with X
104
105       Emacs  has been tailored to work well with the X window system.  If you
106       run Emacs from under X windows, it will create its own X window to dis‐
107       play  in.   You  will probably want to start the editor as a background
108       process so that you can continue using your original window.
109
110       Emacs can be started with the following X switches:
111
112       -name name
113               Specifies the name which should  be  assigned  to  the  initial
114               Emacs  window.  This controls looking up X resources as well as
115               the window title.
116
117       -title name
118               Specifies the title for the initial X window.
119
120       -r      Display the Emacs window in reverse video.
121
122       -font font, -fn font
123               Set the Emacs window's font to that  specified  by  font.   You
124               will  find the various X fonts in the /usr/lib/X11/fonts direc‐
125               tory.  Note that Emacs will  only  accept  fixed  width  fonts.
126               Under  the X11 Release 4 font-naming conventions, any font with
127               the value "m" or "c" in the eleventh field of the font name  is
128               a  fixed  width font.  Furthermore, fonts whose name are of the
129               form widthxheight are generally fixed width,  as  is  the  font
130               fixed.  See xlsfonts(1) for more information.
131
132               When  you  specify  a  font, be sure to put a space between the
133               switch and the font name.
134
135       -bw pixels
136               Set the Emacs window's border width to  the  number  of  pixels
137               specified by pixels.  Defaults to one pixel on each side of the
138               window.
139
140       -ib pixels
141               Set the window's internal border width to the number of  pixels
142               specified  by pixels.  Defaults to one pixel of padding on each
143               side of the window.
144
145       --geometry geometry
146               Set the Emacs window's width, height, and  position  as  speci‐
147               fied.   The geometry specification is in the standard X format;
148               see X(1) for more information.  The width and height are speci‐
149               fied  in  characters;  the  default is 80 by 24.  See the Emacs
150               manual, section "Options for Window  Size  and  Position",  for
151               information on how window sizes interact with selecting or des‐
152               electing the tool bar and menu bar.
153
154       -fg color
155               On color displays, sets the color of the text.
156
157               Use the command M-x list-colors-display for  a  list  of  valid
158               color names.
159
160       -bg color
161               On color displays, sets the color of the window's background.
162
163       -bd color
164               On color displays, sets the color of the window's border.
165
166       -cr color
167               On color displays, sets the color of the window's text cursor.
168
169       -ms color
170               On color displays, sets the color of the window's mouse cursor.
171
172       -d displayname, -display displayname
173               Create  the  Emacs  window on the display specified by display‐
174               name.  Must be the first option specified in the command line.
175
176       -nw     Tells Emacs not to use its special interface to X.  If you  use
177               this  switch  when invoking Emacs from an xterm(1) window, dis‐
178               play is done in that window.
179
180       You can set X default values for your Emacs windows in your .Xresources
181       file (see xrdb(1)).  Use the following format:
182
183              emacs.keyword:value
184
185       where value specifies the default value of keyword.  Emacs lets you set
186       default values for the following keywords:
187
188       font (class Font)
189               Sets the window's text font.
190
191       reverseVideo (class ReverseVideo)
192               If reverseVideo's value is set to on, the window will  be  dis‐
193               played in reverse video.
194
195       bitmapIcon (class BitmapIcon)
196               If  bitmapIcon's  value  is  set to on, the window will iconify
197               into the "kitchen sink."
198
199       borderWidth (class BorderWidth)
200               Sets the window's border width in pixels.
201
202       internalBorder (class BorderWidth)
203               Sets the window's internal border width in pixels.
204
205       foreground (class Foreground)
206               For color displays, sets the window's text color.
207
208       background (class Background)
209               For color displays, sets the window's background color.
210
211       borderColor (class BorderColor)
212               For color displays, sets the color of the window's border.
213
214       cursorColor (class Foreground)
215               For color displays, sets the color of the window's text cursor.
216
217       pointerColor (class Foreground)
218               For color displays, sets the color of the window's  mouse  cur‐
219               sor.
220
221       geometry (class Geometry)
222               Sets the geometry of the Emacs window (as described above).
223
224       title (class Title)
225               Sets the title of the Emacs window.
226
227       iconName (class Title)
228               Sets the icon name for the Emacs window icon.
229
230       If  you  try to set color values while using a black and white display,
231       the window's characteristics will default as  follows:  the  foreground
232       color  will be set to black, the background color will be set to white,
233       the border color will be set to grey, and the text  and  mouse  cursors
234       will be set to black.
235
236       Using the Mouse
237
238       The  following  lists  the  mouse  button bindings for the Emacs window
239       under X11.
240
241
242       MOUSE BUTTON        FUNCTION
243       left                Set point.
244       middle              Paste text.
245       right               Cut text into X cut buffer.
246       SHIFT-middle        Cut text into X cut buffer.
247       SHIFT-right         Paste text.
248       CTRL-middle         Cut text into X cut buffer and kill it.
249       CTRL-right          Select this window, then split it into two  windows.
250                           Same as typing CTRL-x 2.
251       CTRL-SHIFT-left     X buffer menu — hold the buttons and keys down, wait
252                           for menu to  appear,  select  buffer,  and  release.
253                           Move mouse out of menu and release to cancel.
254       CTRL-SHIFT-middle   X help menu — pop up index card menu for Emacs help.
255       CTRL-SHIFT-right    Select  window with mouse, and delete all other win‐
256                           dows.  Same as typing CTRL-x 1.
257

MANUALS

259       You can order printed copies of the GNU  Emacs  Manual  from  the  Free
260       Software  Foundation, which develops GNU software.  See the file ORDERS
261       for ordering information.
262       Your local Emacs maintainer might also have copies available.  As  with
263       all  software  and publications from FSF, everyone is permitted to make
264       and distribute copies of the Emacs manual.  The TeX source to the  man‐
265       ual is also included in the Emacs source distribution.
266

FILES

268       /usr/local/share/info  - files for the Info documentation browser.  The
269       complete text of the Emacs reference manual is included in a convenient
270       tree  structured  form.  Also includes the Emacs Lisp Reference Manual,
271       useful to anyone wishing to write programs in the Emacs Lisp  extension
272       language.
273
274       /usr/local/share/emacs/$VERSION/lisp  -  Lisp source files and compiled
275       files that define most editing commands.  Some  are  preloaded;  others
276       are autoloaded from this directory when used.
277
278       /usr/local/libexec/emacs/$VERSION/$ARCH  -  various  programs  that are
279       used with GNU Emacs.
280
281       /usr/local/share/emacs/$VERSION/etc - various files of information.
282
283       /usr/local/share/emacs/$VERSION/etc/DOC.* - contains the  documentation
284       strings  for  the  Lisp  primitives and preloaded Lisp functions of GNU
285       Emacs.  They are stored here to reduce the size of Emacs proper.
286
287       /usr/local/share/emacs/$VERSION/etc/SERVICE lists people offering vari‐
288       ous  services  to assist users of GNU Emacs, including education, trou‐
289       bleshooting, porting and customization.
290
291

BUGS

293       There is a mailing list,  bug-gnu-emacs@gnu.org,  for  reporting  Emacs
294       bugs and fixes.  But before reporting something as a bug, please try to
295       be sure that it really is a bug, not a misunderstanding or a deliberate
296       feature.   We ask you to read the section ``Reporting Emacs Bugs'' near
297       the end of the reference manual (or Info system) for hints on  how  and
298       when to report bugs.  Also, include the version number of the Emacs you
299       are running in every bug report that you send in.
300
301       Do not expect a personal answer  to  a  bug  report.   The  purpose  of
302       reporting  bugs  is to get them fixed for everyone in the next release,
303       if possible.  For personal assistance, look in the  SERVICE  file  (see
304       above) for a list of people who offer it.
305
306       Please  do not send anything but bug reports to this mailing list.  For
307       more  information   about   Emacs   mailing   lists,   see   the   file
308       /usr/local/emacs/etc/MAILINGLISTS.   Bugs  tend actually to be fixed if
309       they can be isolated, so it is in your interest to report them in  such
310       a way that they can be easily reproduced.
311

UNRESTRICTIONS

313       Emacs  is free; anyone may redistribute copies of Emacs to anyone under
314       the terms stated in the Emacs General Public License, a copy  of  which
315       accompanies  each copy of Emacs and which also appears in the reference
316       manual.
317
318       Copies of Emacs may sometimes be received packaged  with  distributions
319       of  Unix  systems, but it is never included in the scope of any license
320       covering those systems.  Such inclusion violates  the  terms  on  which
321       distribution is permitted.  In fact, the primary purpose of the General
322       Public License is to prohibit anyone from attaching any other  restric‐
323       tions to redistribution of Emacs.
324
325       Richard  Stallman encourages you to improve and extend Emacs, and urges
326       that you contribute your extensions to the GNU library.  Eventually GNU
327       (Gnu's  Not  Unix)  will  be a complete replacement for Unix.  Everyone
328       will be free to use, copy, study and change the GNU system.
329

SEE ALSO

331       emacsclient(1), etags(1), X(1), xlsfonts(1), xterm(1), xrdb(1)
332

AUTHORS

334       Emacs was written by Richard Stallman and the Free Software Foundation.
335       Joachim Martillo and Robert Krawitz added the X features.
336

COPYING

338       Copyright (C) 1995, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
339             2006, 2007 Free Software Foundation, Inc.
340
341       Permission  is  granted  to make and distribute verbatim copies of this
342       document provided the copyright notice and this permission  notice  are
343       preserved on all copies.
344
345       Permission  is granted to copy and distribute modified versions of this
346       document under the conditions for verbatim copying, provided  that  the
347       entire  resulting derived work is distributed under the terms of a per‐
348       mission notice identical to this one.
349
350       Permission is granted to copy and distribute translations of this docu‐
351       ment  into  another  language,  under the above conditions for modified
352       versions, except that this permission notice may be stated in a  trans‐
353       lation approved by the Free Software Foundation.
354
355
356
357
358GNU Emacs 22.1                   2007 April 13                        EMACS(1)
Impressum