1EMACS(1)                              GNU                             EMACS(1)
2
3
4

NAME

6       emacs - GNU project Emacs editor
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.  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 as‐
23       sumes that you know how to manipulate Emacs windows and buffers.  CTRL-
24       h  or  F1 enters the Help facility.  Help Tutorial (CTRL-h t) starts an
25       interactive tutorial to quickly teach  beginners  the  fundamentals  of
26       Emacs.   Help  Apropos  (CTRL-h a) helps you find a command with a name
27       matching a given pattern, Help Key (CTRL-h k) describes a given key se‐
28       quence, and 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  ap‐
46                      plies only to the next file specified.
47
48              +line:column
49                      Go to the specified line and column.
50
51              --chdir=directory
52                      Change to directory.
53
54              -q, --no-init-file
55                      Do not load an init file.
56
57              -nl, --no-shared-memory
58                      Do not use shared memory.
59
60              --no-site-file
61                      Do not load the site-wide startup file.
62
63              -nsl, --no-site-lisp
64                      Do not add site-lisp directories to load-path.
65
66              --no-desktop
67                      Do not load a saved desktop.
68
69              -Q, --quick
70                      Similar to "-q --no-site-file --no-splash".  Also, avoid
71                      processing X resources.
72
73              --no-splash
74                      Do not display a splash screen during start-up.
75
76              --debug-init
77                      Enable Emacs Lisp debugger during the processing of  the
78                      user  init  file ~/.emacs.  This is useful for debugging
79                      problems in the init file.
80
81              -u user, --user=user
82                      Load user's init file.
83
84              --init-directory=directory
85                      Start emacs with user-emacs-directory set to directory.
86
87              -t file, --terminal=file
88                      Use specified file as  the  terminal  instead  of  using
89                      stdin/stdout.  This must be the first argument specified
90                      in the command line.
91
92              --daemon[=name], --bg-daemon[=name]
93                      Start Emacs as a daemon, enabling the Emacs  server  and
94                      disconnecting  from  the terminal.  You can then use the
95                      emacsclient (see emacsclient(1)) command to  connect  to
96                      the server (with optional name).
97
98              --fg-daemon[=name]
99                      Like "--bg-daemon", but don't disconnect from the termi‐
100                      nal.
101
102              --version
103                      Display Emacs version information and exit.
104
105              --help  Display this help and exit.
106
107       The following options are Lisp-oriented (these options are processed in
108       the order encountered):
109
110              -f function, --funcall=function
111                      Execute the lisp function function.
112
113              -l file, --load=file
114                      Load the lisp code in the file file.
115
116              --eval=expr, --execute=expr
117                      Evaluate the Lisp expression expr.
118
119       The following options are useful when running Emacs as a batch editor:
120
121              --batch Edit  in  batch  mode.  The editor will send messages to
122                      stderr.  You must use -l and -f options to specify files
123                      to execute and functions to call.
124
125              --script file
126                      Run file as an Emacs Lisp script.
127
128              --insert=file
129                      Insert contents of file into the current buffer.
130
131              --kill  Exit Emacs while in batch mode.
132
133              -L dir, --directory=dir
134                      Add  dir  to  the list of directories Emacs searches for
135                      Lisp files.
136
137   Using Emacs with X
138       Emacs has been tailored to work well with the X Window System.  If  you
139       run Emacs from under X windows, it will create its own X window to dis‐
140       play in.  You will probably want to start the editor  as  a  background
141       process so that you can continue using your original window.
142
143       Emacs can be started with the following X switches:
144
145              --name=name
146                      Specify the name which should be assigned to the initial
147                      Emacs window.  This controls looking up X  resources  as
148                      well as the window title.
149
150              --no-x-resources
151                      Do not load X resources.
152
153              -T name, --title=name
154                      Specify the title for the initial X window.
155
156              -r, -rv, --reverse-video
157                      Display the Emacs window in reverse video.
158
159              -fn font, --font=font
160                      Set  the  Emacs window's font to that specified by font.
161                      You   will   find   the   various   X   fonts   in   the
162                      /usr/lib/X11/fonts directory.  Note that Emacs will only
163                      accept fixed width fonts.  Under the X11 Release 4 font-
164                      naming  conventions,  any font with the value "m" or "c"
165                      in the eleventh field of the font name is a fixed  width
166                      font.   Furthermore,  fonts  whose  name are of the form
167                      widthxheight are generally fixed width, as is  the  font
168                      fixed.  See xlsfonts(1) for more information.
169
170                      When  you specify a font, be sure to put a space between
171                      the switch and the font name.
172
173              --xrm=resources
174                      Set additional X resources.
175
176              --color, --color=mode
177                      Override color mode for character  terminals;  mode  de‐
178                      faults  to "auto", and can also be "never", "auto", "al‐
179                      ways", or a mode name like "ansi8".
180
181              -bw pixels, --border-width=pixels
182                      Set the Emacs window's border width  to  the  number  of
183                      pixels  specified  by  pixels.  Defaults to one pixel on
184                      each side of the window.
185
186              -ib pixels, --internal-border=pixels
187                      Set the window's internal border width to the number  of
188                      pixels  specified  by  pixels.  Defaults to one pixel of
189                      padding on each side of the window.
190
191              -g geometry, --geometry=geometry
192                      Set the Emacs window's width, height,  and  position  as
193                      specified.   The  geometry specification is in the stan‐
194                      dard X format; see X(7) for more information.  The width
195                      and  height are specified in characters; the default for
196                      GUI frames is a width of 80 and a height between 35  and
197                      40, depending on the OS and the window manager.  See the
198                      Emacs manual, section "Options for Window Size and Posi‐
199                      tion", for information on how window sizes interact with
200                      selecting or deselecting the tool bar, tab bar and  menu
201                      bar.
202
203              -lsp pixels, --line-spacing=pixels
204                      Additional space to put between lines.
205
206              -vb, --vertical-scroll-bars
207                      Enable vertical scrollbars.
208
209              -fh, --fullheight
210                      Make the first frame as high as the screen.
211
212              -fs, --fullscreen
213                      Make the first frame fullscreen.
214
215              -fw, --fullwidth
216                      Make the first frame as wide as the screen.
217
218              -mm, --maximized
219                      Maximize the first frame, like "-fw -fh".
220
221              -fg color, --foreground-color=color
222                      On color displays, set the color of the text.
223
224                      Use  the  command  M-x list-colors-display for a list of
225                      valid color names.
226
227              -bg color, --background-color=color
228                      On color displays, set the color of the  window's  back‐
229                      ground.
230
231              -bd color, --border-color=color
232                      On color displays, set the color of the window's border.
233
234              -cr color, --cursor-color=color
235                      On  color  displays,  set the color of the window's text
236                      cursor.
237
238              -ms color, --mouse-color=color
239                      On color displays, set the color of the  window's  mouse
240                      cursor.
241
242              -d displayname, --display=displayname
243                      Create the Emacs window on the display specified by dis‐
244                      playname.  Must be the first  option  specified  in  the
245                      command line.
246
247              -nbi, --no-bitmap-icon
248                      Do not use picture of gnu for Emacs icon.
249
250              --iconic
251                      Start Emacs in iconified state.
252
253              -nbc, --no-blinking-cursor
254                      Disable blinking cursor.
255
256              --parent-id=xid
257                      Set parent window.
258
259              -nw, --no-window-system
260                      Tell  Emacs not to create a graphical frame.  If you use
261                      this switch when invoking Emacs from an xterm(1) window,
262                      display is done in that window.
263
264              -D, --basic-display
265                      This  option  disables many display features; use it for
266                      debugging Emacs.
267
268       You can set X default values for your Emacs windows in your .Xresources
269       file (see xrdb(1)).  Use the following format:
270
271              emacs.keyword:value
272
273       where value specifies the default value of keyword.  Emacs lets you set
274       default values for the following keywords:
275
276              background (class Background)
277                      For color displays, sets the window's background color.
278
279              bitmapIcon (class BitmapIcon)
280                      If bitmapIcon's value is set  to  on,  the  window  will
281                      iconify into the "kitchen sink."
282
283              borderColor (class BorderColor)
284                      For  color displays, sets the color of the window's bor‐
285                      der.
286
287              borderWidth (class BorderWidth)
288                      Sets the window's border width in pixels.
289
290              cursorColor (class Foreground)
291                      For color displays, sets the color of the window's  text
292                      cursor.
293
294              cursorBlink (class CursorBlink)
295                      Specifies whether to make the cursor blink.  The default
296                      is on.  Use off or false to turn cursor blinking off.
297
298              font (class Font)
299                      Sets the window's text font.
300
301              foreground (class Foreground)
302                      For color displays, sets the window's text color.
303
304              fullscreen (class Fullscreen)
305                      The desired fullscreen size.  The value can  be  one  of
306                      fullboth,  maximized,  fullwidth,  or  fullheight, which
307                      correspond to the  command-line  options  "-fs",  "-mm",
308                      "-fw",  and "-fh", respectively.  Note that this applies
309                      to the initial frame only.
310
311              geometry (class Geometry)
312                      Sets the geometry of  the  Emacs  window  (as  described
313                      above).
314
315              iconName (class Title)
316                      Sets the icon name for the Emacs window icon.
317
318              internalBorder (class BorderWidth)
319                      Sets the window's internal border width in pixels.
320
321              lineSpacing (class LineSpacing)
322                      Additional space ("leading") between lines, in pixels.
323
324              menuBar (class MenuBar)
325                      Gives  frames  menu  bars if on; don't have menu bars if
326                      off.  See the Emacs manual, sections  "Lucid  Resources"
327                      and "Motif Resources", for how to control the appearance
328                      of the menu bar if you have one.
329
330              minibuffer (class Minibuffer)
331                      If none, don't make a minibuffer in this frame.  It will
332                      use a separate minibuffer frame instead.
333
334              paneFont (class Font)
335                      Font  name for menu pane titles, in non-toolkit versions
336                      of Emacs.
337
338              pointerColor (class Foreground)
339                      For color displays, sets the color of the window's mouse
340                      cursor.
341
342              privateColormap (class PrivateColormap)
343                      If  on,  use  a private color map, in the case where the
344                      "default visual" of class PseudoColor and Emacs is using
345                      it.
346
347              reverseVideo (class ReverseVideo)
348                      If reverseVideo's value is set to on, the window will be
349                      displayed in reverse video.
350
351              screenGamma (class ScreenGamma)
352                      Gamma correction for colors, equivalent to the frame pa‐
353                      rameter "screen-gamma".
354
355              scrollBarWidth (class ScrollBarWidth)
356                      The  scroll bar width in pixels, equivalent to the frame
357                      parameter "scroll-bar-width".
358
359              selectionFont (class SelectionFont)
360                      Font name for pop-up menu items, in non-toolkit versions
361                      of  Emacs.  (For toolkit versions, see the Emacs manual,
362                      sections "Lucid Resources" and "Motif Resources".)
363
364              selectionTimeout (class SelectionTimeout)
365                      Number of milliseconds to wait for a selection reply.  A
366                      value of 0 means wait as long as necessary.
367
368              synchronous (class Synchronous)
369                      Run  Emacs  in synchronous mode if on.  Synchronous mode
370                      is useful for debugging X problems.
371
372              title (class Title)
373                      Sets the title of the Emacs window.
374
375              toolBar (class ToolBar)
376                      Number of lines to reserve for the tool bar.
377
378              tabBar (class TabBar)
379                      Number of lines to reserve for the tab bar.
380
381              useXIM (class UseXIM)
382                      Turns off use of X input methods (XIM) if false or off.
383
384              verticalScrollBars (class ScrollBars)
385                      Gives frames scroll bars if on; suppresses  scroll  bars
386                      if off.
387
388              visualClass (class VisualClass)
389                      Specify  the  "visual"  that X should use.  This tells X
390                      how to handle colors.  The value should start  with  one
391                      of  TrueColor,  PseudoColor,  DirectColor,  StaticColor,
392                      GrayScale, and StaticGray,  followed  by  -depth,  where
393                      depth is the number of color planes.
394

MANUALS

396       You  can  order  printed  copies  of the GNU Emacs Manual from the Free
397       Software Foundation, which develops GNU software.  See the online store
398       at <https://shop.fsf.org/>.
399       Your local administrator might also have copies available.  As with all
400       software and publications from FSF, everyone is permitted to  make  and
401       distribute  copies of the Emacs manual.  The Texinfo source to the man‐
402       ual is also included in the Emacs source distribution.
403

FILES

405       /usr/local/share/info — files for the Info documentation browser.   The
406       complete text of the Emacs reference manual is included in a convenient
407       tree structured form.  This includes the Emacs Lisp  Reference  Manual,
408       useful  to anyone wishing to write programs in the Emacs Lisp extension
409       language, and the Introduction to Programming in Emacs Lisp.
410
411       /usr/local/share/emacs/$VERSION/lisp — Lisp source files  and  compiled
412       files  that  define  most editing commands.  Some are preloaded; others
413       are autoloaded from this directory when used.
414
415       /usr/local/libexec/emacs/$VERSION/$ARCH —  various  programs  that  are
416       used with GNU Emacs.
417
418       /usr/local/share/emacs/$VERSION/etc — various files of information.
419
420       /usr/local/share/emacs/$VERSION/etc/DOC.*  — contains the documentation
421       strings for the Lisp primitives and preloaded  Lisp  functions  of  GNU
422       Emacs.  They are stored here to reduce the size of Emacs proper.
423
424

BUGS

426       There  is  a  mailing  list, bug-gnu-emacs@gnu.org, for reporting Emacs
427       bugs and fixes.  But before reporting something as a bug, please try to
428       be sure that it really is a bug, not a misunderstanding or a deliberate
429       feature.  We ask you to read the section "Reporting Bugs" in the  Emacs
430       manual  for  hints  on  how and when to report bugs.  Also, include the
431       version number of the Emacs you are running in every  bug  report  that
432       you  send  in.  Bugs tend actually to be fixed if they can be isolated,
433       so it is in your interest to report them in such a way that they can be
434       easily reproduced.
435
436       Do  not  expect  a personal answer to a bug report.  The purpose of re‐
437       porting bugs is to get them fixed for everyone in the next release,  if
438       possible.   For  personal  assistance, consult the service directory at
439       <https://www.fsf.org/resources/service/> for a list of people who offer
440       it.
441
442       Please  do not send anything but bug reports to this mailing list.  For
443       other Emacs lists, see <https://savannah.gnu.org/mail/?group=emacs>.
444

UNRESTRICTIONS

446       Emacs is free; anyone may redistribute copies of Emacs to anyone  under
447       the terms stated in the GNU General Public License, a copy of which ac‐
448       companies each copy of Emacs and which also appears  in  the  reference
449       manual.
450
451       Copies  of  Emacs may sometimes be received packaged with distributions
452       of Unix systems, but it is never included in the scope of  any  license
453       covering  those  systems.   Such  inclusion violates the terms on which
454       distribution is permitted.  In fact, the primary  purpose  of  the  GNU
455       General  Public  License is to prohibit anyone from attaching any other
456       restrictions to redistribution of Emacs.
457
458       Richard Stallman encourages you to improve and extend Emacs, and  urges
459       that you contribute your extensions to the GNU library.  Eventually GNU
460       (Gnu's Not Unix) will be a complete  replacement  for  Unix.   Everyone
461       will be free to use, copy, study and change the GNU system.
462

SEE ALSO

464       emacsclient(1), etags(1), X(7), xlsfonts(1), xterm(1), xrdb(1)
465

AUTHORS

467       Emacs was written by Richard Stallman and the Free Software Foundation.
468       For detailed credits and acknowledgments, see the GNU Emacs manual.
469

COPYING

471       Copyright 1995, 1999-2023 Free Software Foundation, Inc.
472
473       Permission is granted to make and distribute verbatim  copies  of  this
474       document  provided  the copyright notice and this permission notice are
475       preserved on all copies.
476
477       Permission is granted to copy and distribute modified versions of  this
478       document  under  the conditions for verbatim copying, provided that the
479       entire resulting derived work is distributed under the terms of a  per‐
480       mission notice identical to this one.
481
482       Permission is granted to copy and distribute translations of this docu‐
483       ment into another language, under the  above  conditions  for  modified
484       versions,  except that this permission notice may be stated in a trans‐
485       lation approved by the Free Software Foundation.
486
487
488
489
490GNU Emacs 29.1                    2022-06-07                          EMACS(1)
Impressum