cmdargs.texi 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211
  1. @c This is part of the Emacs manual.
  2. @c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2017 Free Software
  3. @c Foundation, Inc.
  4. @c See file emacs.texi for copying conditions.
  5. @node Emacs Invocation
  6. @appendix Command Line Arguments for Emacs Invocation
  7. @cindex command line arguments
  8. @cindex arguments (command line)
  9. @cindex options (command line)
  10. @cindex switches (command line)
  11. @cindex startup (command line arguments)
  12. @cindex invocation (command line arguments)
  13. @c FIXME: Document '--smid'? --xfq
  14. Emacs supports command line arguments to request various actions
  15. when invoking Emacs. These are for compatibility with other editors
  16. and for sophisticated activities. We don't recommend using them for
  17. ordinary editing (@xref{Emacs Server}, for a way to access an existing
  18. Emacs job from the command line).
  19. Arguments starting with @samp{-} are @dfn{options}, and so is
  20. @samp{+@var{linenum}}. All other arguments specify files to visit.
  21. Emacs visits the specified files while it starts up. The last file
  22. specified on the command line becomes the current buffer; the other
  23. files are also visited in other buffers. As with most programs, the
  24. special argument @samp{--} says that all subsequent arguments are file
  25. names, not options, even if they start with @samp{-}.
  26. Emacs command options can specify many things, such as the size and
  27. position of the X window Emacs uses, its colors, and so on. A few
  28. options support advanced usage, such as running Lisp functions on files
  29. in batch mode. The sections of this chapter describe the available
  30. options, arranged according to their purpose.
  31. There are two ways of writing options: the short forms that start with
  32. a single @samp{-}, and the long forms that start with @samp{--}. For
  33. example, @samp{-d} is a short form and @samp{--display} is the
  34. corresponding long form.
  35. The long forms with @samp{--} are easier to remember, but longer to
  36. type. However, you don't have to spell out the whole option name; any
  37. unambiguous abbreviation is enough. When a long option takes an
  38. argument, you can use either a space or an equal sign to separate the
  39. option name and the argument. Thus, you can write either
  40. @samp{--display sugar-bombs:0.0} or @samp{--display=sugar-bombs:0.0}.
  41. We recommend an equal sign because it makes the relationship clearer,
  42. and the tables below always show an equal sign.
  43. @cindex initial options (command line)
  44. @cindex action options (command line)
  45. @vindex command-line-args
  46. Most options specify how to initialize Emacs, or set parameters for
  47. the Emacs session. We call them @dfn{initial options}. A few options
  48. specify things to do, such as loading libraries or calling Lisp
  49. functions. These are called @dfn{action options}. These and file
  50. names together are called @dfn{action arguments}. The action
  51. arguments are stored as a list of strings in the variable
  52. @code{command-line-args}. (Actually, when Emacs starts up,
  53. @code{command-line-args} contains all the arguments passed from the
  54. command line; during initialization, the initial arguments are removed
  55. from this list when they are processed, leaving only the action
  56. arguments.)
  57. @menu
  58. * Action Arguments:: Arguments to visit files, load libraries,
  59. and call functions.
  60. * Initial Options:: Arguments that take effect while starting Emacs.
  61. * Command Example:: Examples of using command line arguments.
  62. * Environment:: Environment variables that Emacs uses.
  63. * Display X:: Changing the default display and using remote login.
  64. * Font X:: Choosing a font for text, under X.
  65. * Colors X:: Choosing display colors.
  66. * Window Size X:: Start-up window size, under X.
  67. * Borders X:: Internal and outer borders, under X.
  68. * Title X:: Specifying the initial frame's title.
  69. * Icons X:: Choosing what sort of icon to use, under X.
  70. * Misc X:: Other display options.
  71. @end menu
  72. @node Action Arguments
  73. @appendixsec Action Arguments
  74. Here is a table of action arguments:
  75. @table @samp
  76. @item @var{file}
  77. @opindex --file
  78. @itemx --file=@var{file}
  79. @opindex --find-file
  80. @itemx --find-file=@var{file}
  81. @opindex --visit
  82. @itemx --visit=@var{file}
  83. @cindex visiting files, command-line argument
  84. @vindex inhibit-startup-buffer-menu
  85. Visit @var{file} using @code{find-file}. @xref{Visiting}.
  86. When Emacs starts up, it displays the startup buffer in one window,
  87. and the buffer visiting @var{file} in another window
  88. (@pxref{Windows}). If you supply more than one file argument, the
  89. displayed file is the last one specified on the command line; the
  90. other files are visited but their buffers are not shown.
  91. If the startup buffer is disabled (@pxref{Entering Emacs}), then
  92. @var{file} is visited in a single window if one file argument was
  93. supplied; with two file arguments, Emacs displays the files in two
  94. different windows; with more than two file argument, Emacs displays
  95. the last file specified in one window, plus a Buffer Menu in a
  96. different window (@pxref{Several Buffers}). To inhibit using the
  97. Buffer Menu for this, change the variable
  98. @code{inhibit-startup-buffer-menu} to @code{t}.
  99. @item +@var{linenum} @var{file}
  100. @opindex +@var{linenum}
  101. Visit @var{file} using @code{find-file}, then go to line number
  102. @var{linenum} in it.
  103. @item +@var{linenum}:@var{columnnum} @var{file}
  104. Visit @var{file} using @code{find-file}, then go to line number
  105. @var{linenum} and put point at column number @var{columnnum}.
  106. @item -l @var{file}
  107. @opindex -l
  108. @itemx --load=@var{file}
  109. @opindex --load
  110. @cindex loading Lisp libraries, command-line argument
  111. Load a Lisp library named @var{file} with the function @code{load}.
  112. If @var{file} is not an absolute file name, Emacs first looks for it
  113. in the current directory, then in the directories listed in
  114. @code{load-path} (@pxref{Lisp Libraries}).
  115. @strong{Warning:} If previous command-line arguments have visited
  116. files, the current directory is the directory of the last file
  117. visited.
  118. @item -L @var{dir}
  119. @opindex -L
  120. @itemx --directory=@var{dir}
  121. @opindex --directory
  122. Prepend directory @var{dir} to the variable @code{load-path}.
  123. If you specify multiple @samp{-L} options, Emacs preserves the
  124. relative order; i.e., using @samp{-L /foo -L /bar} results in
  125. a @code{load-path} of the form @code{("/foo" "/bar" @dots{})}.
  126. If @var{dir} begins with @samp{:}, Emacs removes the @samp{:} and
  127. appends (rather than prepends) the remainder to @code{load-path}.
  128. (On MS Windows, use @samp{;} instead of @samp{:}; i.e., use
  129. the value of @code{path-separator}.)
  130. @item -f @var{function}
  131. @opindex -f
  132. @itemx --funcall=@var{function}
  133. @opindex --funcall
  134. @cindex call Lisp functions, command-line argument
  135. Call Lisp function @var{function}. If it is an interactive function
  136. (a command), it reads the arguments interactively just as if you had
  137. called the same function with a key sequence. Otherwise, it calls the
  138. function with no arguments.
  139. @item --eval=@var{expression}
  140. @opindex --eval
  141. @itemx --execute=@var{expression}
  142. @opindex --execute
  143. @cindex evaluate expression, command-line argument
  144. Evaluate Lisp expression @var{expression}.
  145. @item --insert=@var{file}
  146. @opindex --insert
  147. @cindex insert file contents, command-line argument
  148. Insert the contents of @var{file} into the buffer that is current when
  149. this command-line argument is processed. Usually, this is the
  150. @file{*scratch*} buffer (@pxref{Lisp Interaction}), but if arguments
  151. earlier on the command line visit files or switch buffers, that might
  152. be a different buffer. The effect of this command-line argument is
  153. like what @kbd{M-x insert-file} does (@pxref{Misc File Ops}).
  154. @item --kill
  155. @opindex --kill
  156. Exit from Emacs without asking for confirmation.
  157. @item --help
  158. @opindex --help
  159. Print a usage message listing all available options, then exit
  160. successfully.
  161. @item --version
  162. @opindex --version
  163. Print Emacs version, then exit successfully.
  164. @end table
  165. @node Initial Options
  166. @appendixsec Initial Options
  167. The initial options specify parameters for the Emacs session. This
  168. section describes the more general initial options; some other options
  169. specifically related to the X Window System appear in the following
  170. sections.
  171. Some initial options affect the loading of the initialization file.
  172. Normally, Emacs first loads @file{site-start.el} if it exists, then
  173. your own initialization file if it exists, and finally the default
  174. initialization file @file{default.el} if it exists (@pxref{Init
  175. File}). Certain options prevent loading of some of these files or
  176. substitute other files for them.
  177. @table @samp
  178. @item -chdir @var{directory}
  179. @opindex -chdir
  180. @itemx --chdir=@var{directory}
  181. @opindex --chdir
  182. @cindex change Emacs directory
  183. Change to @var{directory} before doing anything else. This is mainly used
  184. by session management in X so that Emacs starts in the same directory as it
  185. stopped. This makes desktop saving and restoring easier.
  186. @item -t @var{device}
  187. @opindex -t
  188. @itemx --terminal=@var{device}
  189. @opindex --terminal
  190. @cindex device for Emacs terminal I/O
  191. Use @var{device} as the device for terminal input and output. This
  192. option implies @samp{--no-window-system}.
  193. @item -d @var{display}
  194. @opindex -d
  195. @itemx --display=@var{display}
  196. @opindex --display
  197. @cindex display for Emacs frame
  198. Use the X Window System and use the display named @var{display} to open
  199. the initial Emacs frame. @xref{Display X}, for more details.
  200. @item -nw
  201. @opindex -nw
  202. @itemx --no-window-system
  203. @opindex --no-window-system
  204. @cindex disable window system
  205. Don't communicate directly with the window system, disregarding the
  206. @env{DISPLAY} environment variable even if it is set. This means that
  207. Emacs uses the terminal from which it was launched for all its display
  208. and input.
  209. @cindex batch mode
  210. @item -batch
  211. @opindex --batch
  212. @itemx --batch
  213. Run Emacs in @dfn{batch mode}. Batch mode is used for running
  214. programs written in Emacs Lisp from shell scripts, makefiles, and so
  215. on. To invoke a Lisp program, use the @samp{-batch} option in
  216. conjunction with one or more of @samp{-l}, @samp{-f} or @samp{--eval}
  217. (@pxref{Action Arguments}). @xref{Command Example}, for an example.
  218. In batch mode, Emacs does not display the text being edited, and the
  219. standard terminal interrupt characters such as @kbd{C-z} and @kbd{C-c}
  220. have their usual effect. Emacs functions that normally print a
  221. message in the echo area will print to either the standard output
  222. stream (@code{stdout}) or the standard error stream (@code{stderr})
  223. instead. (To be precise, functions like @code{prin1}, @code{princ}
  224. and @code{print} print to @code{stdout}, while @code{message} and
  225. @code{error} print to @code{stderr}.) Functions that normally read
  226. keyboard input from the minibuffer take their input from the
  227. terminal's standard input stream (@code{stdin}) instead.
  228. @samp{--batch} implies @samp{-q} (do not load an initialization file),
  229. but @file{site-start.el} is loaded nonetheless. It also causes Emacs
  230. to exit after processing all the command options. In addition, it
  231. disables auto-saving except in buffers for which auto-saving is
  232. explicitly requested, and when saving files it omits the @code{fsync}
  233. system call unless otherwise requested.
  234. @item --script @var{file}
  235. @opindex --script
  236. @cindex script mode
  237. Run Emacs in batch mode, like @samp{--batch}, and then read and
  238. execute the Lisp code in @var{file}.
  239. The normal use of this option is in executable script files that run
  240. Emacs. They can start with this text on the first line
  241. @example
  242. #!/usr/bin/emacs --script
  243. @end example
  244. @noindent
  245. which will invoke Emacs with @samp{--script} and supply the name of
  246. the script file as @var{file}. Emacs Lisp then treats the @samp{#!}
  247. on this first line as a comment delimiter.
  248. @item --no-build-details
  249. @opindex --no-build-details
  250. @cindex build details
  251. @cindex deterministic build
  252. Omit details like system name and build time from the Emacs executable,
  253. so that builds are more deterministic.
  254. @item -q
  255. @opindex -q
  256. @itemx --no-init-file
  257. @opindex --no-init-file
  258. @cindex bypassing init and @file{default.el} file
  259. @cindex init file, not loading
  260. @cindex @file{default.el} file, not loading
  261. Do not load any initialization file (@pxref{Init File}). When Emacs
  262. is invoked with this option, the Customize facility does not allow
  263. options to be saved (@pxref{Easy Customization}). This option does
  264. not disable loading @file{site-start.el}.
  265. @item --no-site-file
  266. @opindex --no-site-file
  267. @cindex @file{site-start.el} file, not loading
  268. Do not load @file{site-start.el} (@pxref{Init File}). The @samp{-Q}
  269. option does this too, but other options like @samp{-q} do not.
  270. @item --no-site-lisp
  271. @opindex --no-site-lisp
  272. @cindex @file{site-start.el} file, not loading
  273. Do not include the @file{site-lisp} directories in @code{load-path}
  274. (@pxref{Init File}). The @samp{-Q} option does this too.
  275. @item --no-splash
  276. @opindex --no-splash
  277. @vindex inhibit-startup-screen
  278. @cindex splash screen
  279. @cindex startup message
  280. Do not display a startup screen. You can also achieve this effect by
  281. setting the variable @code{inhibit-startup-screen} to non-@code{nil}
  282. in your initialization file (@pxref{Entering Emacs}).
  283. @item -Q
  284. @opindex -Q
  285. @itemx --quick
  286. @opindex --quick
  287. Start emacs with minimum customizations. This is similar to using @samp{-q},
  288. @samp{--no-site-file}, @samp{--no-site-lisp}, and @samp{--no-splash}
  289. together. This also stops Emacs from processing X resources by
  290. setting @code{inhibit-x-resources} to @code{t} (@pxref{Resources}).
  291. @item -daemon
  292. @opindex -daemon
  293. @itemx --daemon[=@var{name}]
  294. @opindex --daemon
  295. @itemx --bg-daemon[=@var{name}]
  296. @itemx --fg-daemon[=@var{name}]
  297. Start Emacs as a daemon---after Emacs starts up, it starts the Emacs
  298. server without opening any frames.
  299. (Optionally, you can specify an explicit @var{name} for the server.)
  300. You can then use the @command{emacsclient} command to connect to Emacs
  301. for editing. @xref{Emacs Server}, for information about using Emacs
  302. as a daemon. A ``background'' daemon disconnects from the terminal
  303. and runs in the background (@samp{--daemon} is an alias for
  304. @samp{--bg-daemon}).
  305. @item --no-desktop
  306. @opindex --no-desktop
  307. Do not reload any saved desktop. @xref{Saving Emacs Sessions}.
  308. @item -u @var{user}
  309. @opindex -u
  310. @itemx --user=@var{user}
  311. @opindex --user
  312. @cindex load init file of another user
  313. Load @var{user}'s initialization file instead of your
  314. own@footnote{This option has no effect on MS-Windows.}.
  315. @item --debug-init
  316. @opindex --debug-init
  317. @cindex errors in init file
  318. Enable the Emacs Lisp debugger for errors in the init file.
  319. @xref{Error Debugging,, Entering the Debugger on an Error, elisp, The
  320. GNU Emacs Lisp Reference Manual}.
  321. @item --module-assertions
  322. @opindex --module-assertions
  323. @cindex module verification
  324. Enable expensive correctness checks when dealing with dynamically
  325. loadable modules. This is intended for module authors that wish to
  326. verify that their module conforms to the module API requirements. The
  327. option makes Emacs abort if a module-related assertion triggers.
  328. @end table
  329. @node Command Example
  330. @appendixsec Command Argument Example
  331. Here is an example of using Emacs with arguments and options. It
  332. assumes you have a Lisp program file called @file{hack-c.el} which, when
  333. loaded, performs some useful operation on the current buffer, expected
  334. to be a C program.
  335. @example
  336. emacs --batch foo.c -l hack-c -f save-buffer >& log
  337. @end example
  338. @noindent
  339. This says to visit @file{foo.c}, load @file{hack-c.el} (which makes
  340. changes in the visited file), save @file{foo.c} (note that
  341. @code{save-buffer} is the function that @kbd{C-x C-s} is bound to), and
  342. then exit back to the shell (because of @samp{--batch}). @samp{--batch}
  343. also guarantees there will be no problem redirecting output to
  344. @file{log}, because Emacs will not assume that it has a display terminal
  345. to work with.
  346. @node Environment
  347. @appendixsec Environment Variables
  348. @cindex environment variables
  349. The @dfn{environment} is a feature of the operating system; it
  350. consists of a collection of variables with names and values. Each
  351. variable is called an @dfn{environment variable}; environment variable
  352. names are case-sensitive, and it is conventional to use upper case
  353. letters only. The values are all text strings.
  354. What makes the environment useful is that subprocesses inherit the
  355. environment automatically from their parent process. This means you
  356. can set up an environment variable in your login shell, and all the
  357. programs you run (including Emacs) will automatically see it.
  358. Subprocesses of Emacs (such as shells, compilers, and version control
  359. programs) inherit the environment from Emacs, too.
  360. @findex setenv
  361. @findex getenv
  362. @vindex initial-environment
  363. Inside Emacs, the command @kbd{M-x getenv} reads the name of an
  364. environment variable, and prints its value in the echo area. @kbd{M-x
  365. setenv} sets a variable in the Emacs environment, and @kbd{C-u M-x
  366. setenv} removes a variable. (Environment variable substitutions with
  367. @samp{$} work in the value just as in file names; see @ref{File Names
  368. with $}.) The variable @code{initial-environment} stores the initial
  369. environment inherited by Emacs.
  370. The way to set environment variables outside of Emacs depends on the
  371. operating system, and especially the shell that you are using. For
  372. example, here's how to set the environment variable @env{ORGANIZATION}
  373. to @samp{not very much} using Bash:
  374. @example
  375. export ORGANIZATION="not very much"
  376. @end example
  377. @noindent
  378. and here's how to do it in csh or tcsh:
  379. @example
  380. setenv ORGANIZATION "not very much"
  381. @end example
  382. When Emacs is using the X Window System, various environment
  383. variables that control X work for Emacs as well. See the X
  384. documentation for more information.
  385. @menu
  386. * General Variables:: Environment variables that all versions of Emacs use.
  387. * Misc Variables:: Certain system-specific variables.
  388. * MS-Windows Registry:: An alternative to the environment on MS-Windows.
  389. @end menu
  390. @node General Variables
  391. @appendixsubsec General Variables
  392. Here is an alphabetical list of environment variables that have
  393. special meanings in Emacs. Most of these variables are also used by
  394. some other programs. Emacs does not require any of these environment
  395. variables to be set, but it uses their values if they are set.
  396. @c This used to be @vtable, but that enters the variables alone into
  397. @c the Variable Index, which in some cases, like HOME, might be
  398. @c confused with keys by that name, and other cases, like NAME,
  399. @c might be confused with general-purpose phrases.
  400. @table @env
  401. @item CDPATH
  402. @vindex CDPATH, environment variable
  403. Used by the @code{cd} command to search for the directory you specify,
  404. when you specify a relative directory name.
  405. @item DBUS_SESSION_BUS_ADDRESS
  406. @vindex DBUS_SESSION_BUS_ADDRESS, environment variable
  407. Used by D-Bus when Emacs is compiled with it. Usually, there is no
  408. need to change it. Setting it to a dummy address, like
  409. @samp{unix:path=/dev/null}, suppresses connections to the D-Bus session
  410. bus as well as autolaunching the D-Bus session bus if not running yet.
  411. @item EMACSDATA
  412. @vindex EMACSDATA, environment variable
  413. Directory for the architecture-independent files that come with Emacs.
  414. This is used to initialize the variable @code{data-directory}.
  415. @item EMACSDOC
  416. @vindex EMACSDOC, environment variable
  417. Directory for the documentation string file, which is used to
  418. initialize the Lisp variable @code{doc-directory}.
  419. @item EMACSLOADPATH
  420. @vindex EMACSLOADPATH, environment variable
  421. A colon-separated list of directories@footnote{Here and below,
  422. whenever we say ``colon-separated list of directories'', it pertains
  423. to Unix and GNU/Linux systems. On MS-DOS and MS-Windows, the
  424. directories are separated by semi-colons instead, since DOS/Windows
  425. file names might include a colon after a drive letter.} to search for
  426. Emacs Lisp files. If set, it modifies the usual initial value of the
  427. @code{load-path} variable (@pxref{Lisp Libraries}). An empty element
  428. stands for the default value of @code{load-path}; e.g., using
  429. @samp{EMACSLOADPATH="/tmp:"} adds @file{/tmp} to the front of
  430. the default @code{load-path}. To specify an empty element in the
  431. middle of the list, use 2 colons in a row, as in
  432. @samp{EMACSLOADPATH="/tmp::/foo"}.
  433. @item EMACSPATH
  434. @vindex EMACSPATH, environment variable
  435. A colon-separated list of directories to search for executable files.
  436. If set, Emacs uses this in addition to @env{PATH} (see below) when
  437. initializing the variable @code{exec-path} (@pxref{Shell}).
  438. @item EMAIL
  439. @vindex EMAIL, environment variable
  440. @vindex user-mail-address@r{, initialization}
  441. Your email address; used to initialize the Lisp variable
  442. @code{user-mail-address}, which the Emacs mail interface puts into the
  443. @samp{From} header of outgoing messages (@pxref{Mail Headers}).
  444. @item ESHELL
  445. @vindex ESHELL, environment variable
  446. Used for shell-mode to override the @env{SHELL} environment variable
  447. (@pxref{Interactive Shell}).
  448. @item HISTFILE
  449. @vindex HISTFILE, environment variable
  450. The name of the file that shell commands are saved in between logins.
  451. This variable defaults to @file{~/.bash_history} if you use Bash, to
  452. @file{~/.sh_history} if you use ksh, and to @file{~/.history}
  453. otherwise.
  454. @item HOME
  455. @vindex HOME, environment variable
  456. The location of your files in the directory tree; used for
  457. expansion of file names starting with a tilde (@file{~}). On MS-DOS,
  458. it defaults to the directory from which Emacs was started, with
  459. @samp{/bin} removed from the end if it was present. On Windows, the
  460. default value of @env{HOME} is the @file{Application Data}
  461. subdirectory of the user profile directory (normally, this is
  462. @file{C:/Documents and Settings/@var{username}/Application Data},
  463. where @var{username} is your user name), though for backwards
  464. compatibility @file{C:/} will be used instead if a @file{.emacs} file
  465. is found there.
  466. @item HOSTNAME
  467. @vindex HOSTNAME, environment variable
  468. The name of the machine that Emacs is running on.
  469. @c complete.el is obsolete since 24.1.
  470. @ignore
  471. @item INCPATH
  472. A colon-separated list of directories. Used by the @code{complete} package
  473. to search for files.
  474. @end ignore
  475. @item INFOPATH
  476. @vindex INFOPATH, environment variable
  477. A colon-separated list of directories in which to search for Info files.
  478. @item LC_ALL
  479. @vindex LC_ALL, environment variable
  480. @itemx LC_COLLATE
  481. @vindex LC_COLLATE, environment variable
  482. @itemx LC_CTYPE
  483. @vindex LC_CTYPE, environment variable
  484. @itemx LC_MESSAGES
  485. @vindex LC_MESSAGES, environment variable
  486. @itemx LC_MONETARY
  487. @vindex LC_MONETARY, environment variable
  488. @itemx LC_NUMERIC
  489. @vindex LC_NUMERIC, environment variable
  490. @itemx LC_TIME
  491. @vindex LC_TIME, environment variable
  492. @itemx LANG
  493. @vindex LANG, environment variable
  494. The user's preferred locale. The locale has six categories, specified
  495. by the environment variables @env{LC_COLLATE} for sorting,
  496. @env{LC_CTYPE} for character encoding, @env{LC_MESSAGES} for system
  497. messages, @env{LC_MONETARY} for monetary formats, @env{LC_NUMERIC} for
  498. numbers, and @env{LC_TIME} for dates and times. If one of these
  499. variables is not set, the category defaults to the value of the
  500. @env{LANG} environment variable, or to the default @samp{C} locale if
  501. @env{LANG} is not set. But if @env{LC_ALL} is specified, it overrides
  502. the settings of all the other locale environment variables.
  503. On MS-Windows and macOS, if @env{LANG} is not already set in the
  504. environment, Emacs sets it based on the system-wide default. You can
  505. set this in the ``Regional Settings'' Control Panel on some versions
  506. of MS-Windows, and in the ``Language and Region'' System Preference on
  507. macOS.
  508. The value of the @env{LC_CTYPE} category is
  509. matched against entries in @code{locale-language-names},
  510. @code{locale-charset-language-names}, and
  511. @code{locale-preferred-coding-systems}, to select a default language
  512. environment and coding system. @xref{Language Environments}.
  513. @item LOGNAME
  514. @vindex LOGNAME, environment variable
  515. The user's login name. See also @env{USER}.
  516. @item MAIL
  517. @vindex MAIL, environment variable
  518. The name of your system mail inbox.
  519. @ifnottex
  520. @item MH
  521. @vindex MH, environment variable
  522. Name of setup file for the mh system. @xref{Top,,MH-E,mh-e, The Emacs
  523. Interface to MH}.
  524. @end ifnottex
  525. @item NAME
  526. @vindex NAME, environment variable
  527. Your real-world name. This is used to initialize the variable
  528. @code{user-full-name} (@pxref{Mail Headers}).
  529. @item NNTPSERVER
  530. @vindex NNTPSERVER, environment variable
  531. The name of the news server. Used by the mh and Gnus packages.
  532. @item ORGANIZATION
  533. @vindex ORGANIZATION, environment variable
  534. The name of the organization to which you belong. Used for setting the
  535. @samp{Organization:} header in your posts from the Gnus package.
  536. @item PATH
  537. @vindex PATH, environment variable
  538. A colon-separated list of directories containing executable files.
  539. This is used to initialize the variable @code{exec-path}
  540. (@pxref{Shell}).
  541. @item PWD
  542. @vindex PWD, environment variable
  543. If set, this should be the default directory when Emacs was started.
  544. @item REPLYTO
  545. @vindex REPLYTO, environment variable
  546. If set, this specifies an initial value for the variable
  547. @code{mail-default-reply-to} (@pxref{Mail Headers}).
  548. @item SAVEDIR
  549. @vindex SAVEDIR, environment variable
  550. The name of a directory in which news articles are saved by default.
  551. Used by the Gnus package.
  552. @item SHELL
  553. @vindex SHELL, environment variable
  554. The name of an interpreter used to parse and execute programs run from
  555. inside Emacs.
  556. @item SMTPSERVER
  557. @vindex SMTPSERVER, environment variable
  558. The name of the outgoing mail server. This is used to initialize the
  559. variable @code{smtpmail-smtp-server} (@pxref{Mail Sending}).
  560. @cindex background mode, on @command{xterm}
  561. @item TERM
  562. @vindex TERM, environment variable
  563. The type of the terminal that Emacs is using. This variable must be
  564. set unless Emacs is run in batch mode. On MS-DOS, it defaults to
  565. @samp{internal}, which specifies a built-in terminal emulation that
  566. handles the machine's own display.
  567. @item TERMCAP
  568. @vindex TERMCAP, environment variable
  569. The name of the termcap library file describing how to program the
  570. terminal specified by @env{TERM}. This defaults to
  571. @file{/etc/termcap}.
  572. @item TMPDIR
  573. @vindex TMPDIR, environment variable
  574. @itemx TMP
  575. @vindex TMP, environment variable
  576. @itemx TEMP
  577. @vindex TEMP, environment variable
  578. These environment variables are used to initialize the variable
  579. @code{temporary-file-directory}, which specifies a directory in which
  580. to put temporary files (@pxref{Backup}). Emacs tries to use
  581. @env{TMPDIR} first. If that is unset, Emacs normally falls back on
  582. @file{/tmp}, but on MS-Windows and MS-DOS it instead falls back on
  583. @env{TMP}, then @env{TEMP}, and finally @file{c:/temp}.
  584. @item TZ
  585. @vindex TZ, environment variable
  586. This specifies the default time zone and possibly also daylight
  587. saving time information. @xref{Time Zone Rules,,, elisp, The GNU
  588. Emacs Lisp Reference Manual}. On MS-DOS, if @env{TZ} is not set in the
  589. environment when Emacs starts, Emacs defines a default value as
  590. appropriate for the country code returned by DOS@. On MS-Windows, Emacs
  591. does not use @env{TZ} at all.
  592. @item USER
  593. @vindex USER, environment variable
  594. The user's login name. See also @env{LOGNAME}. On MS-DOS, this
  595. defaults to @samp{root}.
  596. @item VERSION_CONTROL
  597. @vindex VERSION_CONTROL, environment variable
  598. Used to initialize the @code{version-control} variable (@pxref{Backup
  599. Names}).
  600. @end table
  601. @node Misc Variables
  602. @appendixsubsec Miscellaneous Variables
  603. These variables are used only on particular configurations:
  604. @vtable @env
  605. @item COMSPEC
  606. On MS-DOS and MS-Windows, the name of the command interpreter to use
  607. when invoking batch files and commands internal to the shell. On MS-DOS
  608. this is also used to make a default value for the @env{SHELL} environment
  609. variable.
  610. @item NAME
  611. On MS-DOS, this variable defaults to the value of the @env{USER}
  612. variable.
  613. @item EMACSTEST
  614. On MS-DOS, this specifies a file to use to log the operation of the
  615. internal terminal emulator. This feature is useful for submitting bug
  616. reports.
  617. @item EMACSCOLORS
  618. On MS-DOS, this specifies the screen colors. It is useful to set them
  619. this way, since otherwise Emacs would display the default colors
  620. momentarily when it starts up.
  621. The value of this variable should be the two-character encoding of the
  622. foreground (the first character) and the background (the second
  623. character) colors of the default face. Each character should be the
  624. hexadecimal code for the desired color on a standard PC text-mode
  625. display. For example, to get blue text on a light gray background,
  626. specify @samp{EMACSCOLORS=17}, since 1 is the code of the blue color and
  627. 7 is the code of the light gray color.
  628. The PC display usually supports only eight background colors. However,
  629. Emacs switches the DOS display to a mode where all 16 colors can be used
  630. for the background, so all four bits of the background color are
  631. actually used.
  632. @item PRELOAD_WINSOCK
  633. On MS-Windows, if you set this variable, Emacs will load and initialize
  634. the network library at startup, instead of waiting until the first
  635. time it is required.
  636. @item emacs_dir
  637. On MS-Windows, @env{emacs_dir} is a special environment variable, which
  638. indicates the full path of the directory in which Emacs is installed.
  639. If Emacs is installed in the standard directory structure, it
  640. calculates this value automatically. It is not much use setting this
  641. variable yourself unless your installation is non-standard, since
  642. unlike other environment variables, it will be overridden by Emacs at
  643. startup. When setting other environment variables, such as
  644. @env{EMACSLOADPATH}, you may find it useful to use @env{emacs_dir}
  645. rather than hard-coding an absolute path. This allows multiple
  646. versions of Emacs to share the same environment variable settings, and
  647. it allows you to move the Emacs installation directory, without
  648. changing any environment or registry settings.
  649. @end vtable
  650. @node MS-Windows Registry
  651. @appendixsubsec The MS-Windows System Registry
  652. @pindex addpm, MS-Windows installation program
  653. @cindex registry, setting environment variables (MS-Windows)
  654. On MS-Windows, the installation program @command{addpm.exe} adds
  655. values for @env{emacs_dir}, @env{EMACSLOADPATH}, @env{EMACSDATA},
  656. @env{EMACSPATH}, @env{EMACSDOC}, @env{SHELL} and @env{TERM} to the
  657. @file{HKEY_LOCAL_MACHINE} section of the system registry, under
  658. @file{/Software/GNU/Emacs}. It does this because there is no standard
  659. place to set environment variables across different versions of
  660. Windows. Running @command{addpm.exe} is no longer strictly necessary
  661. in recent versions of Emacs, but if you are upgrading from an older
  662. version, running @command{addpm.exe} ensures that you do not have
  663. older registry entries from a previous installation, which may not be
  664. compatible with the latest version of Emacs.
  665. When Emacs starts, as well as checking the environment, it also checks
  666. the System Registry for those variables and for @env{HOME}, @env{LANG}
  667. and @env{PRELOAD_WINSOCK}.
  668. To determine the value of those variables, Emacs goes through the
  669. following procedure. First, the environment is checked. If the
  670. variable is not found there, Emacs looks for registry keys by that
  671. name under @file{/Software/GNU/Emacs}; first in the
  672. @file{HKEY_CURRENT_USER} section of the registry, and if not found
  673. there, in the @file{HKEY_LOCAL_MACHINE} section. Finally, if Emacs
  674. still cannot determine the values, compiled-in defaults are used.
  675. In addition to the environment variables above, you can also add many
  676. of the settings which on X belong in the @file{.Xdefaults} file
  677. (@pxref{X Resources}) to the @file{/Software/GNU/Emacs} registry key.
  678. @node Display X
  679. @appendixsec Specifying the Display Name
  680. @cindex display name (X Window System)
  681. @cindex @env{DISPLAY} environment variable
  682. The environment variable @env{DISPLAY} tells all X clients,
  683. including Emacs, where to display their windows. Its value is set by
  684. default in ordinary circumstances, when you start an X server and run
  685. jobs locally. You can specify the display yourself; one reason to do
  686. this is if you want to log into another system and run Emacs there,
  687. and have the window displayed at your local terminal.
  688. @env{DISPLAY} has the syntax
  689. @samp{@var{host}:@var{display}.@var{screen}}, where @var{host} is the
  690. host name of the X Window System server machine, @var{display} is an
  691. arbitrarily-assigned number that distinguishes your server (X
  692. terminal) from other servers on the same machine, and @var{screen} is
  693. a field that allows an X server to control multiple terminal screens.
  694. The period and the @var{screen} field are optional. If included,
  695. @var{screen} is usually zero.
  696. For example, if your host is named @samp{glasperle} and your server is
  697. the first (or perhaps the only) server listed in the configuration, your
  698. @env{DISPLAY} is @samp{glasperle:0.0}.
  699. You can specify the display name explicitly when you run Emacs, either
  700. by changing the @env{DISPLAY} variable, or with the option @samp{-d
  701. @var{display}} or @samp{--display=@var{display}}. Here is an example:
  702. @smallexample
  703. emacs --display=glasperle:0 &
  704. @end smallexample
  705. You can inhibit the use of the X window system with the @samp{-nw}
  706. option. Then Emacs uses its controlling text terminal for display.
  707. @xref{Initial Options}.
  708. Sometimes, security arrangements prevent a program on a remote system
  709. from displaying on your local system. In this case, trying to run Emacs
  710. produces messages like this:
  711. @smallexample
  712. Xlib: connection to "glasperle:0.0" refused by server
  713. @end smallexample
  714. @noindent
  715. You might be able to overcome this problem by using the @command{xhost}
  716. command on the local system to give permission for access from your
  717. remote machine.
  718. @node Font X
  719. @appendixsec Font Specification Options
  720. @cindex font name (X Window System)
  721. You can use the command line option @samp{-fn @var{font}} (or
  722. @samp{--font}, which is an alias for @samp{-fn}) to specify a default
  723. font:
  724. @table @samp
  725. @item -fn @var{font}
  726. @opindex -fn
  727. @itemx --font=@var{font}
  728. @opindex --font
  729. @cindex specify default font from the command line
  730. Use @var{font} as the default font.
  731. @end table
  732. When passing a font name to Emacs on the command line, you may need to
  733. quote it, by enclosing it in quotation marks, if it contains
  734. characters that the shell treats specially (e.g., spaces). For
  735. example:
  736. @smallexample
  737. emacs -fn "DejaVu Sans Mono-12"
  738. @end smallexample
  739. @xref{Fonts}, for details about font names and other ways to specify
  740. the default font.
  741. @node Colors X
  742. @appendixsec Window Color Options
  743. @cindex color of window, from command line
  744. @cindex text colors, from command line
  745. You can use the following command-line options to specify the colors
  746. to use for various parts of the Emacs display. Colors may be
  747. specified using either color names or RGB triplets (@pxref{Colors}).
  748. @table @samp
  749. @item -fg @var{color}
  750. @opindex -fg
  751. @itemx --foreground-color=@var{color}
  752. @opindex --foreground-color
  753. @cindex foreground color, command-line argument
  754. Specify the foreground color, overriding the color specified by the
  755. @code{default} face (@pxref{Faces}).
  756. @item -bg @var{color}
  757. @opindex -bg
  758. @itemx --background-color=@var{color}
  759. @opindex --background-color
  760. @cindex background color, command-line argument
  761. Specify the background color, overriding the color specified by the
  762. @code{default} face.
  763. @item -bd @var{color}
  764. @opindex -bd
  765. @itemx --border-color=@var{color}
  766. @opindex --border-color
  767. @cindex border color, command-line argument
  768. Specify the color of the border of the X window. This has no effect
  769. if Emacs is compiled with GTK+ support.
  770. @item -cr @var{color}
  771. @opindex -cr
  772. @itemx --cursor-color=@var{color}
  773. @opindex --cursor-color
  774. @cindex cursor color, command-line argument
  775. Specify the color of the Emacs cursor which indicates where point is.
  776. @item -ms @var{color}
  777. @opindex -ms
  778. @itemx --mouse-color=@var{color}
  779. @opindex --mouse-color
  780. @cindex mouse pointer color, command-line argument
  781. Specify the color for the mouse cursor when the mouse is in the Emacs window.
  782. @item -r
  783. @opindex -r
  784. @itemx -rv
  785. @opindex -rv
  786. @itemx --reverse-video
  787. @opindex --reverse-video
  788. @cindex reverse video, command-line argument
  789. Reverse video---swap the foreground and background colors.
  790. @item --color=@var{mode}
  791. @opindex --color
  792. @cindex standard colors on a character terminal
  793. @cindex override character terminal color support
  794. Set the @dfn{color support mode} when Emacs is run on a text terminal.
  795. This option overrides the number of supported colors that the
  796. character terminal advertises in its @code{termcap} or @code{terminfo}
  797. database. The parameter @var{mode} can be one of the following:
  798. @table @samp
  799. @item never
  800. @itemx no
  801. Don't use colors even if the terminal's capabilities specify color
  802. support.
  803. @item default
  804. @itemx auto
  805. Same as when @option{--color} is not used at all: Emacs detects at
  806. startup whether the terminal supports colors, and if it does, turns on
  807. colored display.
  808. @item always
  809. @itemx yes
  810. @itemx ansi8
  811. Turn on the color support unconditionally, and use color commands
  812. specified by the ANSI escape sequences for the 8 standard colors.
  813. @item @var{num}
  814. Use color mode for @var{num} colors. If @var{num} is -1, turn off
  815. color support (equivalent to @samp{never}); if it is 0, use the
  816. default color support for this terminal (equivalent to @samp{auto});
  817. otherwise use an appropriate standard mode for @var{num} colors.
  818. Depending on your terminal's capabilities, Emacs might be able to turn
  819. on a color mode for 8, 16, 88, or 256 as the value of @var{num}. If
  820. there is no mode that supports @var{num} colors, Emacs acts as if
  821. @var{num} were 0, i.e., it uses the terminal's default color support
  822. mode.
  823. @end table
  824. If @var{mode} is omitted, it defaults to @var{ansi8}.
  825. @end table
  826. For example, to use a coral mouse cursor and a slate blue text cursor,
  827. enter:
  828. @example
  829. emacs -ms coral -cr 'slate blue' &
  830. @end example
  831. You can reverse the foreground and background colors through the
  832. @samp{-rv} option or with the X resource @samp{reverseVideo}.
  833. The @samp{-fg}, @samp{-bg}, and @samp{-rv} options function on text
  834. terminals as well as on graphical displays.
  835. @node Window Size X
  836. @appendixsec Options for Window Size and Position
  837. @cindex geometry of Emacs window
  838. @cindex position and size of Emacs frame
  839. @cindex width and height of Emacs frame
  840. @cindex specifying fullscreen for Emacs frame
  841. Here is a list of the command-line options for specifying size and
  842. position of the initial Emacs frame:
  843. @table @samp
  844. @item -g @var{width}x@var{height}@r{[@{}+-@r{@}}@var{xoffset}@r{@{}+-@r{@}}@var{yoffset}@r{]]}
  845. @opindex -g
  846. @itemx --geometry=@var{width}x@var{height}@r{[@{}+-@r{@}}@var{xoffset}@r{@{}+-@r{@}}@var{yoffset}@r{]]}
  847. @opindex --geometry
  848. @cindex geometry, command-line argument
  849. Specify the size @var{width} and @var{height} (measured in character
  850. columns and lines), and positions @var{xoffset} and @var{yoffset}
  851. (measured in pixels). The @var{width} and @var{height} parameters
  852. apply to all frames, whereas @var{xoffset} and @var{yoffset} only to
  853. the initial frame.
  854. @item -fs
  855. @opindex -fs
  856. @itemx --fullscreen
  857. @opindex --fullscreen
  858. @cindex fullscreen, command-line argument
  859. Specify that width and height should be that of the screen. Normally
  860. no window manager decorations are shown. (After starting Emacs,
  861. you can toggle this state using @key{F11}, @code{toggle-frame-fullscreen}.)
  862. @item -mm
  863. @opindex -mm
  864. @itemx --maximized
  865. @opindex --maximized
  866. @cindex maximized, command-line argument
  867. Specify that the Emacs frame should be maximized. This normally
  868. means that the frame has window manager decorations.
  869. (After starting Emacs, you can toggle this state using @kbd{M-F10},
  870. @code{toggle-frame-maximized}.)
  871. @item -fh
  872. @opindex -fh
  873. @itemx --fullheight
  874. @opindex --fullheight
  875. @cindex fullheight, command-line argument
  876. Specify that the height should be the height of the screen.
  877. @item -fw
  878. @opindex -fw
  879. @itemx --fullwidth
  880. @opindex --fullwidth
  881. @cindex fullwidth, command-line argument
  882. Specify that the width should be the width of the screen.
  883. @end table
  884. @noindent
  885. In the @samp{--geometry} option, @code{@r{@{}+-@r{@}}} means either a plus
  886. sign or a minus sign. A plus
  887. sign before @var{xoffset} means it is the distance from the left side of
  888. the screen; a minus sign means it counts from the right side. A plus
  889. sign before @var{yoffset} means it is the distance from the top of the
  890. screen, and a minus sign there indicates the distance from the bottom.
  891. The values @var{xoffset} and @var{yoffset} may themselves be positive or
  892. negative, but that doesn't change their meaning, only their direction.
  893. Emacs uses the same units as @command{xterm} does to interpret the geometry.
  894. The @var{width} and @var{height} are measured in characters, so a large font
  895. creates a larger frame than a small font. (If you specify a proportional
  896. font, Emacs uses its maximum bounds width as the width unit.) The
  897. @var{xoffset} and @var{yoffset} are measured in pixels.
  898. You do not have to specify all of the fields in the geometry
  899. specification. If you omit both @var{xoffset} and @var{yoffset}, the
  900. window manager decides where to put the Emacs frame, possibly by
  901. letting you place it with the mouse. For example, @samp{164x55}
  902. specifies a window 164 columns wide, enough for two ordinary width
  903. windows side by side, and 55 lines tall.
  904. The default frame width is 80 characters and the default height is
  905. 40 lines. You can omit either the width or the height or both. If
  906. you start the geometry with an integer, Emacs interprets it as the
  907. width. If you start with an @samp{x} followed by an integer, Emacs
  908. interprets it as the height. Thus, @samp{81} specifies just the
  909. width; @samp{x45} specifies just the height.
  910. If you start with @samp{+} or @samp{-}, that introduces an offset,
  911. which means both sizes are omitted. Thus, @samp{-3} specifies the
  912. @var{xoffset} only. (If you give just one offset, it is always
  913. @var{xoffset}.) @samp{+3-3} specifies both the @var{xoffset} and the
  914. @var{yoffset}, placing the frame near the bottom left of the screen.
  915. You can specify a default for any or all of the fields in your X
  916. resource file (@pxref{Resources}), and then override selected fields
  917. with a @samp{--geometry} option.
  918. Since the mode line and the echo area occupy the last 2 lines of the
  919. frame, the height of the initial text window is 2 less than the height
  920. specified in your geometry. In non-X-toolkit versions of Emacs, the
  921. menu bar also takes one line of the specified number. But in the X
  922. toolkit version, the menu bar is additional and does not count against
  923. the specified height. The tool bar, if present, is also additional.
  924. Enabling or disabling the menu bar or tool bar alters the amount of
  925. space available for ordinary text. Therefore, if Emacs starts up with
  926. a tool bar (which is the default), and handles the geometry
  927. specification assuming there is a tool bar, and then your
  928. initialization file disables the tool bar, you will end up with a
  929. frame geometry different from what you asked for. To get the intended
  930. size with no tool bar, use an X resource to specify ``no tool bar''
  931. (@pxref{Table of Resources}); then Emacs will already know there's no
  932. tool bar when it processes the specified geometry.
  933. When using one of @samp{--fullscreen}, @samp{--maximized},
  934. @samp{--fullwidth} or @samp{--fullheight}, some window managers require
  935. you to set the variable @code{frame-resize-pixelwise} to a non-@code{nil}
  936. value to make a frame appear truly maximized or full-screen.
  937. Some window managers have options that can make them ignore both
  938. program-specified and user-specified positions. If these are set,
  939. Emacs fails to position the window correctly.
  940. @node Borders X
  941. @appendixsec Internal and Outer Borders
  942. @cindex borders (X Window System)
  943. An Emacs frame has an internal border and an outer border. The
  944. internal border is an extra strip of the background color around the
  945. text portion of the frame. Emacs itself draws the internal border. The
  946. outer border is drawn by X outside the tool and menu bars of the frame.
  947. There is also an external border which is drawn by the window manager.
  948. The size of the external border cannot be set from within Emacs.
  949. @table @samp
  950. @item -ib @var{width}
  951. @opindex -ib
  952. @itemx --internal-border=@var{width}
  953. @opindex --internal-border
  954. @cindex internal border width, command-line argument
  955. Specify @var{width} as the width of the internal border (around the
  956. frame's text area), in pixels.
  957. @item -bw @var{width}
  958. @opindex -bw
  959. @itemx --border-width=@var{width}
  960. @opindex --border-width
  961. @cindex main border width, command-line argument
  962. @cindex outer border width, command-line argument
  963. Specify @var{width} as the width of the outer border, in pixels.
  964. @end table
  965. When you specify the size of the frame, that does not count the
  966. borders. The frame's position is measured from the outside edge of the
  967. external border.
  968. Use the @samp{-ib @var{n}} option to specify an internal border
  969. @var{n} pixels wide. The default is 1. Use @samp{-bw @var{n}} to
  970. specify the width of the outer border (though the window manager may not
  971. pay attention to what you specify). The default width of the outer
  972. border is 2.
  973. @node Title X
  974. @appendixsec Frame Titles
  975. An Emacs frame may or may not have a specified title. The frame
  976. title, if specified, appears in window decorations and icons as the
  977. name of the frame. If an Emacs frame has no specified title, the
  978. default title has the form @samp{@var{invocation-name}@@@var{machine}}
  979. (if there is only one frame) or the selected window's buffer name (if
  980. there is more than one frame).
  981. You can specify a title for the initial Emacs frame with a command
  982. line option:
  983. @table @samp
  984. @item -T @var{title}
  985. @opindex -T
  986. @itemx --title=@var{title}
  987. @opindex --title
  988. @cindex frame title, command-line argument
  989. Specify @var{title} as the title for the initial Emacs frame.
  990. @end table
  991. The @samp{--name} option (@pxref{Resources}) also specifies the title
  992. for the initial Emacs frame.
  993. @node Icons X
  994. @appendixsec Icons
  995. @cindex icons (X Window System)
  996. @cindex minimizing a frame at startup
  997. @table @samp
  998. @item -iconic
  999. @opindex --iconic
  1000. @itemx --iconic
  1001. @cindex start iconified, command-line argument
  1002. Start Emacs in an iconified state.
  1003. @item -nbi
  1004. @opindex -nbi
  1005. @itemx --no-bitmap-icon
  1006. @opindex --no-bitmap-icon
  1007. @cindex Emacs icon, a gnu
  1008. Disable the use of the Emacs icon.
  1009. @end table
  1010. Most window managers allow you to iconify (or ``minimize'') an
  1011. Emacs frame, hiding it from sight. Some window managers replace
  1012. iconified windows with tiny icons, while others remove them
  1013. entirely from sight. The @samp{-iconic} option tells Emacs to begin
  1014. running in an iconified state, rather than showing a frame right away.
  1015. The text frame doesn't appear until you deiconify (or ``un-minimize'')
  1016. it.
  1017. By default, Emacs uses an icon containing the Emacs logo. On
  1018. desktop environments such as Gnome, this icon is also displayed in
  1019. other contexts, e.g., when switching into an Emacs frame. The
  1020. @samp{-nbi} or @samp{--no-bitmap-icon} option tells Emacs to let the
  1021. window manager choose what sort of icon to use---usually just a small
  1022. rectangle containing the frame's title.
  1023. @node Misc X
  1024. @appendixsec Other Display Options
  1025. @table @samp
  1026. @c @item -hb
  1027. @c @opindex -hb
  1028. @c @itemx --horizontal-scroll-bars
  1029. @c @opindex --horizontal-scroll-bars
  1030. @c @c @cindex horizontal scroll bars, command-line argument
  1031. @c Enable horizontal scroll bars. Since horizontal scroll bars
  1032. @c are not yet implemented, this actually does nothing.
  1033. @item --parent-id @var{id}
  1034. Open Emacs as a client X window via the XEmbed protocol, with @var{id}
  1035. as the parent X window id. Currently, this option is mainly useful
  1036. for developers.
  1037. @item -vb
  1038. @opindex -vb
  1039. @itemx --vertical-scroll-bars
  1040. @opindex --vertical-scroll-bars
  1041. @cindex vertical scroll bars, command-line argument
  1042. Enable vertical scroll bars.
  1043. @item -lsp @var{pixels}
  1044. @opindex -lsp
  1045. @itemx --line-spacing=@var{pixels}
  1046. @opindex --line-spacing
  1047. @cindex line spacing, command-line argument
  1048. Specify @var{pixels} as additional space to put between lines, in pixels.
  1049. @item -nbc
  1050. @opindex -nbc
  1051. @itemx --no-blinking-cursor
  1052. @opindex --no-blinking-cursor
  1053. @cindex blinking cursor disable, command-line argument
  1054. Disable the blinking cursor on graphical displays.
  1055. @item -D
  1056. @opindex -D
  1057. @itemx --basic-display
  1058. @opindex --basic-display
  1059. Disable the menu-bar, the tool-bar, the scroll-bars, and tool tips,
  1060. and turn off the blinking cursor. This can be useful for making a
  1061. test case that simplifies debugging of display problems.
  1062. @end table
  1063. The @samp{--xrm} option (@pxref{Resources}) specifies additional
  1064. X resource values.