Commit | Line | Data |
---|---|---|
6bf7aab6 | 1 | @c This is part of the Emacs manual. |
739a80b3 | 2 | @c Copyright (C) 1985,86,87,93,94,95,1997,2001 Free Software Foundation, Inc. |
6bf7aab6 | 3 | @c See file emacs.texi for copying conditions. |
21af0bfa | 4 | @node Command Arguments, X Resources, Service, Top |
6bf7aab6 DL |
5 | @appendix Command Line Arguments |
6 | @cindex command line arguments | |
7 | @cindex arguments (command line) | |
8 | @cindex options (command line) | |
9 | @cindex switches (command line) | |
10 | @cindex startup (command line arguments) | |
11 | ||
12 | GNU Emacs supports command line arguments to request various actions | |
13 | when invoking Emacs. These are for compatibility with other editors and | |
14 | for sophisticated activities. We don't recommend using them for | |
15 | ordinary editing. | |
16 | ||
17 | Arguments starting with @samp{-} are @dfn{options}. Other arguments | |
18 | specify files to visit. Emacs visits the specified files while it | |
515d3b4b RS |
19 | starts up. The last file name on your command line becomes the |
20 | current buffer; the other files are also visited in other buffers. If | |
21 | there are two files, they are both displayed; otherwise the last file | |
22 | is displayed along with a buffer list that shows what other buffers | |
23 | there are. As with most programs, the special argument @samp{--} says | |
24 | that all subsequent arguments are file names, not options, even if | |
25 | they start with @samp{-}. | |
6bf7aab6 DL |
26 | |
27 | Emacs command options can specify many things, such as the size and | |
28 | position of the X window Emacs uses, its colors, and so on. A few | |
29 | options support advanced usage, such as running Lisp functions on files | |
30 | in batch mode. The sections of this chapter describe the available | |
31 | options, arranged according to their purpose. | |
32 | ||
33 | There are two ways of writing options: the short forms that start with | |
34 | a single @samp{-}, and the long forms that start with @samp{--}. For | |
35 | example, @samp{-d} is a short form and @samp{--display} is the | |
36 | corresponding long form. | |
37 | ||
38 | The long forms with @samp{--} are easier to remember, but longer to | |
39 | type. However, you don't have to spell out the whole option name; any | |
40 | unambiguous abbreviation is enough. When a long option takes an | |
41 | argument, you can use either a space or an equal sign to separate the | |
42 | option name and the argument. Thus, you can write either | |
43 | @samp{--display sugar-bombs:0.0} or @samp{--display=sugar-bombs:0.0}. | |
44 | We recommend an equal sign because it makes the relationship clearer, | |
45 | and the tables below always show an equal sign. | |
46 | ||
47 | @cindex initial options (command line) | |
48 | @cindex action options (command line) | |
49 | Most options specify how to initialize Emacs, or set parameters for | |
50 | the Emacs session. We call them @dfn{initial options}. A few options | |
51 | specify things to do: for example, load libraries, call functions, or | |
0ec1f115 | 52 | terminate Emacs. These are called @dfn{action options}. These and file |
6bf7aab6 DL |
53 | names together are called @dfn{action arguments}. Emacs processes all |
54 | the action arguments in the order they are written. | |
55 | ||
56 | @menu | |
57 | * Action Arguments:: Arguments to visit files, load libraries, | |
58 | and call functions. | |
59 | * Initial Options:: Arguments that take effect while starting Emacs. | |
60 | * Command Example:: Examples of using command line arguments. | |
61 | * Resume Arguments:: Specifying arguments when you resume a running Emacs. | |
62 | * Environment:: Environment variables that Emacs uses. | |
6bf7aab6 DL |
63 | @end menu |
64 | ||
65 | @node Action Arguments | |
66 | @appendixsec Action Arguments | |
67 | ||
68 | Here is a table of the action arguments and options: | |
69 | ||
70 | @table @samp | |
71 | @item @var{file} | |
a8575fe5 | 72 | @opindex --visit |
ec22060b | 73 | @itemx --visit=@var{file} |
a8575fe5 | 74 | @opindex --file |
ec22060b | 75 | @itemx --file=@var{file} |
a8575fe5 | 76 | @cindex visiting files, command-line argument |
6bf7aab6 DL |
77 | Visit @var{file} using @code{find-file}. @xref{Visiting}. |
78 | ||
79 | @item +@var{linenum} @var{file} | |
a8575fe5 | 80 | @opindex +@var{linenum} |
6bf7aab6 DL |
81 | Visit @var{file} using @code{find-file}, then go to line number |
82 | @var{linenum} in it. | |
83 | ||
660872b6 | 84 | @item +@var{linenum}:@var{columnnum} @var{file} |
660872b6 | 85 | Visit @var{file} using @code{find-file}, then go to line number |
0ec1f115 | 86 | @var{linenum} and put point at column number @var{columnnum}. |
660872b6 | 87 | |
6bf7aab6 DL |
88 | @need 3000 |
89 | @item -l @var{file} | |
a8575fe5 | 90 | @opindex -l |
6bf7aab6 | 91 | @itemx --load=@var{file} |
a8575fe5 EZ |
92 | @opindex --load |
93 | @cindex loading Lisp libraries, command-line argument | |
6bf7aab6 DL |
94 | Load a Lisp library named @var{file} with the function @code{load}. |
95 | @xref{Lisp Libraries}. The library can be found either in the current | |
96 | directory, or in the Emacs library search path as specified | |
60a96371 | 97 | with @env{EMACSLOADPATH} (@pxref{General Variables}). |
6bf7aab6 DL |
98 | |
99 | @item -f @var{function} | |
a8575fe5 | 100 | @opindex -f |
6bf7aab6 | 101 | @itemx --funcall=@var{function} |
a8575fe5 EZ |
102 | @opindex --funcall |
103 | @cindex call Lisp functions, command-line argument | |
6bf7aab6 DL |
104 | Call Lisp function @var{function} with no arguments. |
105 | ||
ec22060b | 106 | @item --eval=@var{expression} |
a8575fe5 | 107 | @opindex --eval |
ec22060b | 108 | @itemx --execute=@var{expression} |
a8575fe5 EZ |
109 | @opindex --execute |
110 | @cindex evaluate expression, command-line argument | |
6bf7aab6 DL |
111 | Evaluate Lisp expression @var{expression}. |
112 | ||
113 | @item --insert=@var{file} | |
a8575fe5 EZ |
114 | @opindex --insert |
115 | @cindex insert file contents, command-line argument | |
6bf7aab6 DL |
116 | Insert the contents of @var{file} into the current buffer. This is like |
117 | what @kbd{M-x insert-file} does. @xref{Misc File Ops}. | |
118 | ||
119 | @item --kill | |
a8575fe5 | 120 | @opindex --kill |
6bf7aab6 DL |
121 | Exit from Emacs without asking for confirmation. |
122 | @end table | |
123 | ||
124 | @vindex command-line-args | |
125 | The init file can access the values of the action arguments as the | |
126 | elements of a list in the variable @code{command-line-args}. The init | |
127 | file can override the normal processing of the action arguments, or | |
128 | define new ones, by reading and setting this variable. | |
129 | ||
130 | @node Initial Options | |
131 | @appendixsec Initial Options | |
132 | ||
133 | The initial options specify parameters for the Emacs session. This | |
134 | section describes the more general initial options; some other options | |
97878c08 EZ |
135 | specifically related to the X Window System appear in the following |
136 | sections. | |
6bf7aab6 DL |
137 | |
138 | Some initial options affect the loading of init files. The normal | |
139 | actions of Emacs are to first load @file{site-start.el} if it exists, | |
140 | then your own init file @file{~/.emacs} if it exists, and finally | |
141 | @file{default.el} if it exists; certain options prevent loading of some | |
142 | of these files or substitute other files for them. | |
143 | ||
144 | @table @samp | |
145 | @item -t @var{device} | |
a8575fe5 | 146 | @opindex -t |
6bf7aab6 | 147 | @itemx --terminal=@var{device} |
a8575fe5 EZ |
148 | @opindex --terminal |
149 | @cindex device for Emacs terminal I/O | |
6bf7aab6 DL |
150 | Use @var{device} as the device for terminal input and output. |
151 | ||
152 | @item -d @var{display} | |
a8575fe5 | 153 | @opindex -d |
6bf7aab6 | 154 | @itemx --display=@var{display} |
a8575fe5 EZ |
155 | @opindex --display |
156 | @cindex display for Emacs frame | |
6bf7aab6 | 157 | Use the X Window System and use the display named @var{display} to open |
a8575fe5 | 158 | the initial Emacs frame. @xref{Display X}, for more details. |
6bf7aab6 DL |
159 | |
160 | @item -nw | |
a8575fe5 | 161 | @opindex -nw |
011185fb PJ |
162 | @itemx --no-window-system |
163 | @opindex --no-window-system | |
a8575fe5 | 164 | @cindex disable window system |
54e33bb3 | 165 | Don't communicate directly with the window system, disregarding the |
17e9a80b RS |
166 | @env{DISPLAY} environment variable even if it is set. This means that |
167 | Emacs uses the terminal from which it was launched for all its display | |
168 | and input. | |
6bf7aab6 DL |
169 | |
170 | @need 3000 | |
171 | @cindex batch mode | |
172 | @item -batch | |
a8575fe5 | 173 | @opindex --batch |
6bf7aab6 DL |
174 | @itemx --batch |
175 | Run Emacs in @dfn{batch mode}, which means that the text being edited is | |
176 | not displayed and the standard terminal interrupt characters such as | |
177 | @kbd{C-z} and @kbd{C-c} continue to have their normal effect. Emacs in | |
1ba2ce68 | 178 | batch mode outputs to @code{stderr} only what would normally be displayed |
741c4ff9 DL |
179 | in the echo area under program control, and functions which would |
180 | normally read from the minibuffer take their input from @code{stdin}. | |
6bf7aab6 DL |
181 | |
182 | Batch mode is used for running programs written in Emacs Lisp from | |
183 | shell scripts, makefiles, and so on. Normally the @samp{-l} option | |
184 | or @samp{-f} option will be used as well, to invoke a Lisp program | |
185 | to do the batch processing. | |
186 | ||
0ec1f115 RS |
187 | @samp{-batch} implies @samp{-q} (do not load an init file). It also |
188 | causes Emacs to exit after processing all the command options. In | |
189 | addition, it disables auto-saving except in buffers for which it has | |
190 | been explicitly requested. | |
6bf7aab6 DL |
191 | |
192 | @item -q | |
a8575fe5 | 193 | @opindex -q |
6bf7aab6 | 194 | @itemx --no-init-file |
a8575fe5 EZ |
195 | @opindex --no-init-file |
196 | @cindex bypassing init and site-start file | |
197 | @cindex init file, not loading | |
3b703ce9 | 198 | @cindex @file{default.el} file, not loading |
6bf7aab6 | 199 | Do not load your Emacs init file @file{~/.emacs}, or @file{default.el} |
21742660 | 200 | either. When invoked like this, Emacs does not allow saving options |
00e50428 EZ |
201 | changed with the @kbd{M-x customize} command and its variants. |
202 | @xref{Easy Customization}. | |
6bf7aab6 DL |
203 | |
204 | @item --no-site-file | |
a8575fe5 | 205 | @opindex --no-site-file |
3b703ce9 | 206 | @cindex @file{site-start.el} file, not loading |
6bf7aab6 DL |
207 | Do not load @file{site-start.el}. The options @samp{-q}, @samp{-u} |
208 | and @samp{-batch} have no effect on the loading of this file---this is | |
209 | the only option that blocks it. | |
210 | ||
211 | @item -u @var{user} | |
a8575fe5 | 212 | @opindex -u |
6bf7aab6 | 213 | @itemx --user=@var{user} |
a8575fe5 EZ |
214 | @opindex --user |
215 | @cindex load init file of another user | |
6bf7aab6 DL |
216 | Load @var{user}'s Emacs init file @file{~@var{user}/.emacs} instead of |
217 | your own. | |
218 | ||
219 | @item --debug-init | |
a8575fe5 EZ |
220 | @opindex --debug-init |
221 | @cindex errors in init file | |
6bf7aab6 DL |
222 | Enable the Emacs Lisp debugger for errors in the init file. |
223 | ||
224 | @item --unibyte | |
a8575fe5 | 225 | @opindex --unibyte |
56bfaffd | 226 | @cindex unibyte operation, command-line argument |
1a1b17bc | 227 | Do almost everything with single-byte buffers and strings. |
6bf7aab6 | 228 | All buffers and strings are unibyte unless you (or a Lisp program) |
4b1ad19a RS |
229 | explicitly ask for a multibyte buffer or string. (Note that Emacs |
230 | always loads Lisp files in multibyte mode, even if @samp{--unibyte} is | |
231 | specified; see @ref{Enabling Multibyte}.) Setting the environment | |
232 | variable @env{EMACS_UNIBYTE} has the same effect. | |
6bf7aab6 DL |
233 | |
234 | @item --multibyte | |
a8575fe5 | 235 | @opindex --multibyte |
60a96371 | 236 | Inhibit the effect of @env{EMACS_UNIBYTE}, so that Emacs |
6bf7aab6 DL |
237 | uses multibyte characters by default, as usual. |
238 | @end table | |
239 | ||
240 | @node Command Example | |
241 | @appendixsec Command Argument Example | |
242 | ||
243 | Here is an example of using Emacs with arguments and options. It | |
244 | assumes you have a Lisp program file called @file{hack-c.el} which, when | |
245 | loaded, performs some useful operation on the current buffer, expected | |
246 | to be a C program. | |
247 | ||
248 | @example | |
249 | emacs -batch foo.c -l hack-c -f save-buffer >& log | |
250 | @end example | |
251 | ||
252 | @noindent | |
253 | This says to visit @file{foo.c}, load @file{hack-c.el} (which makes | |
254 | changes in the visited file), save @file{foo.c} (note that | |
255 | @code{save-buffer} is the function that @kbd{C-x C-s} is bound to), and | |
256 | then exit back to the shell (because of @samp{-batch}). @samp{-batch} | |
257 | also guarantees there will be no problem redirecting output to | |
258 | @file{log}, because Emacs will not assume that it has a display terminal | |
259 | to work with. | |
260 | ||
261 | @node Resume Arguments | |
262 | @appendixsec Resuming Emacs with Arguments | |
263 | ||
264 | You can specify action arguments for Emacs when you resume it after | |
265 | a suspension. To prepare for this, put the following code in your | |
266 | @file{.emacs} file (@pxref{Hooks}): | |
267 | ||
515d3b4b | 268 | @c `resume-suspend-hook' is correct. It is the name of a function. |
6bf7aab6 DL |
269 | @example |
270 | (add-hook 'suspend-hook 'resume-suspend-hook) | |
271 | (add-hook 'suspend-resume-hook 'resume-process-args) | |
272 | @end example | |
273 | ||
274 | As further preparation, you must execute the shell script | |
515d3b4b RS |
275 | @file{emacs.csh} (if you use csh as your shell) or @file{emacs.bash} |
276 | (if you use bash as your shell). These scripts define an alias named | |
6bf7aab6 | 277 | @code{edit}, which will resume Emacs giving it new command line |
515d3b4b RS |
278 | arguments such as files to visit. The scripts are found in the |
279 | @file{etc} subdirectory of the Emacs distribution. | |
6bf7aab6 DL |
280 | |
281 | Only action arguments work properly when you resume Emacs. Initial | |
282 | arguments are not recognized---it's too late to execute them anyway. | |
283 | ||
284 | Note that resuming Emacs (with or without arguments) must be done from | |
285 | within the shell that is the parent of the Emacs job. This is why | |
286 | @code{edit} is an alias rather than a program or a shell script. It is | |
287 | not possible to implement a resumption command that could be run from | |
1a1b17bc EZ |
288 | other subjobs of the shell; there is no way to define a command that could |
289 | be made the value of @env{EDITOR}, for example. Therefore, this feature | |
6bf7aab6 DL |
290 | does not take the place of the Emacs Server feature (@pxref{Emacs |
291 | Server}). | |
292 | ||
293 | The aliases use the Emacs Server feature if you appear to have a | |
294 | server Emacs running. However, they cannot determine this with complete | |
295 | accuracy. They may think that a server is still running when in | |
296 | actuality you have killed that Emacs, because the file | |
515d3b4b | 297 | @file{/tmp/esrv@dots{}} still exists. If this happens, find that |
6bf7aab6 DL |
298 | file and delete it. |
299 | ||
300 | @node Environment | |
301 | @appendixsec Environment Variables | |
302 | @cindex environment variables | |
303 | ||
4b1ad19a RS |
304 | The @dfn{environment} is a feature of the operating system; it |
305 | consists of a collection of variables with names and values. Each | |
306 | variable is called an @dfn{environment variable}; environment variable | |
307 | names are case-sensitive, and it is conventional to use upper case | |
308 | letters only. The values are all text strings. | |
6bf7aab6 | 309 | |
4b1ad19a RS |
310 | What makes the environment useful is that subprocesses inherit the |
311 | environment automatically from their parent process. This means you | |
312 | can set up an environment variable in your login shell, and all the | |
313 | programs you run (including Emacs) will automatically see it. | |
314 | Subprocesses of Emacs (such as shells, compilers, and version-control | |
315 | software) inherit the environment from Emacs, too. | |
316 | ||
317 | @findex setenv | |
318 | @findex getenv | |
319 | Inside Emacs, the command @kbd{M-x getenv} gets the value of an | |
320 | environment variable. @kbd{M-x setenv} sets a variable in the Emacs | |
321 | environment. The way to set environment variables outside of Emacs | |
322 | depends on the operating system, and especially the shell that you are | |
323 | using. For example, here's how to set the environment variable | |
324 | @env{ORGANIZATION} to @samp{not very much} using Bash: | |
6bf7aab6 DL |
325 | |
326 | @example | |
327 | export ORGANIZATION="not very much" | |
328 | @end example | |
329 | ||
330 | @noindent | |
331 | and here's how to do it in csh or tcsh: | |
332 | ||
333 | @example | |
334 | setenv ORGANIZATION "not very much" | |
335 | @end example | |
336 | ||
1a1b17bc | 337 | When Emacs is uses the X Window System, it inherits the use |
4b1ad19a | 338 | of a large number of environment variables from the X libraries. See |
6bf7aab6 DL |
339 | the X documentation for more information. |
340 | ||
341 | @menu | |
342 | * General Variables:: Environment variables that all versions of Emacs use. | |
343 | * Misc Variables:: Certain system-specific variables. | |
344 | @end menu | |
345 | ||
346 | @node General Variables | |
347 | @appendixsubsec General Variables | |
348 | ||
4b1ad19a RS |
349 | Here is an alphabetical list of specific environment variables that |
350 | have special meanings in Emacs, giving the name of each variable and | |
351 | its meaning. Most of these variables are also used by some other | |
352 | programs. Emacs does not require any of these environment variables | |
353 | to be set, but it uses their values if they are set. | |
354 | ||
60a96371 | 355 | @table @env |
f51e949c | 356 | @item CDPATH |
6bf7aab6 DL |
357 | Used by the @code{cd} command to search for the directory you specify, |
358 | when you specify a relative directory name. | |
6bf7aab6 | 359 | @item EMACS_UNIBYTE |
56bfaffd | 360 | @cindex unibyte operation, environment variable |
4b1ad19a RS |
361 | Defining this environment variable with a nonempty value directs Emacs |
362 | to do almost everything with single-byte buffers and strings. It is | |
363 | equivalent to using the @samp{--unibyte} command-line option on each | |
364 | invocation. @xref{Initial Options}. | |
6bf7aab6 | 365 | @item EMACSDATA |
4b1ad19a RS |
366 | Directory for the architecture-independent files that come with Emacs. |
367 | This is used to initialize the Lisp variable @code{data-directory}. | |
18a349f5 | 368 | @item EMACSDOC |
4b1ad19a RS |
369 | Directory for the documentation string file, |
370 | @file{DOC-@var{emacsversion}}. This is used to initialize the Lisp | |
b389557a | 371 | variable @code{doc-directory}. |
6bf7aab6 | 372 | @item EMACSLOADPATH |
5d9b65e0 EZ |
373 | A colon-separated list of directories@footnote{ |
374 | Here and below, whenever we say ``colon-separated list of directories'', | |
375 | it pertains to Unix and GNU/Linux systems. On MS-DOS and MS-Windows, | |
376 | the directories are separated by semi-colons instead, since DOS/Windows | |
377 | file names might include a colon after a drive letter.} | |
378 | to search for Emacs Lisp files---used to initialize @code{load-path}. | |
6bf7aab6 | 379 | @item EMACSPATH |
4b1ad19a RS |
380 | A colon-separated list of directories to search for executable |
381 | files---used to initialize @code{exec-path}. | |
6bf7aab6 | 382 | @item ESHELL |
60a96371 | 383 | Used for shell-mode to override the @env{SHELL} environment variable. |
6bf7aab6 DL |
384 | @item HISTFILE |
385 | The name of the file that shell commands are saved in between logins. | |
ec22060b EZ |
386 | This variable defaults to @file{~/.bash_history} if you use Bash, to |
387 | @file{~/.sh_history} if you use ksh, and to @file{~/.history} | |
388 | otherwise. | |
6bf7aab6 DL |
389 | @item HOME |
390 | The location of the user's files in the directory tree; used for | |
391 | expansion of file names starting with a tilde (@file{~}). On MS-DOS, it | |
392 | defaults to the directory from which Emacs was started, with @samp{/bin} | |
71d0aa0c EZ |
393 | removed from the end if it was present. On Windows, the default value |
394 | of @code{HOME} is @file{C:/}, the root directory of drive @file{C:}. | |
6bf7aab6 DL |
395 | @item HOSTNAME |
396 | The name of the machine that Emacs is running on. | |
397 | @item INCPATH | |
398 | A colon-separated list of directories. Used by the @code{complete} package | |
399 | to search for files. | |
400 | @item INFOPATH | |
b389557a | 401 | A colon-separated list of directories in which to search for Info files. |
fbc164de | 402 | @item LC_ALL |
9c6251b6 | 403 | @itemx LC_COLLATE |
6bf7aab6 | 404 | @itemx LC_CTYPE |
9c6251b6 EZ |
405 | @itemx LC_MESSAGES |
406 | @itemx LC_MONETARY | |
407 | @itemx LC_NUMERIC | |
408 | @itemx LC_TIME | |
fbc164de | 409 | @itemx LANG |
9c6251b6 EZ |
410 | The user's preferred locale. The locale has six categories, specified |
411 | by the environment variables @env{LC_COLLATE} for sorting, | |
412 | @env{LC_CTYPE} for character encoding, @env{LC_MESSAGES} for system | |
413 | messages, @env{LC_MONETARY} for monetary formats, @env{LC_NUMERIC} for | |
414 | numbers, and @env{LC_TIME} for dates and times. If one of these | |
415 | variables is not set, the category defaults to the value of the | |
416 | @env{LANG} environment variable, or to the default @samp{C} locale if | |
417 | @env{LANG} is not set. But if @env{LC_ALL} is specified, it overrides | |
418 | the settings of all the other locale environment variables. | |
419 | ||
420 | The value of the LC_CTYPE category is | |
4b1ad19a | 421 | matched against entries in @code{locale-language-names}, |
fbc164de | 422 | @code{locale-charset-language-names}, and |
4b1ad19a RS |
423 | @code{locale-preferred-coding-systems}, to select a default language |
424 | environment and coding system. @xref{Language Environments}. | |
6bf7aab6 | 425 | @item LOGNAME |
60a96371 | 426 | The user's login name. See also @env{USER}. |
6bf7aab6 DL |
427 | @item MAIL |
428 | The name of the user's system mail inbox. | |
429 | @item MAILRC | |
4b1ad19a RS |
430 | Name of file containing mail aliases. (The default is |
431 | @file{~/.mailrc}.) | |
6bf7aab6 | 432 | @item MH |
4b1ad19a | 433 | Name of setup file for the mh system. (The default is @file{~/.mh_profile}.) |
6bf7aab6 DL |
434 | @item NAME |
435 | The real-world name of the user. | |
436 | @item NNTPSERVER | |
5937ea41 | 437 | The name of the news server. Used by the mh and Gnus packages. |
6bf7aab6 DL |
438 | @item ORGANIZATION |
439 | The name of the organization to which you belong. Used for setting the | |
5937ea41 | 440 | `Organization:' header in your posts from the Gnus package. |
6bf7aab6 | 441 | @item PATH |
5d9b65e0 EZ |
442 | A colon-separated list of directories in which executables reside. This |
443 | is used to initialize the Emacs Lisp variable @code{exec-path}. | |
6bf7aab6 DL |
444 | @item PWD |
445 | If set, this should be the default directory when Emacs was started. | |
446 | @item REPLYTO | |
447 | If set, this specifies an initial value for the variable | |
448 | @code{mail-default-reply-to}. @xref{Mail Headers}. | |
449 | @item SAVEDIR | |
450 | The name of a directory in which news articles are saved by default. | |
5937ea41 | 451 | Used by the Gnus package. |
6bf7aab6 DL |
452 | @item SHELL |
453 | The name of an interpreter used to parse and execute programs run from | |
454 | inside Emacs. | |
b370b3b0 | 455 | @cindex background mode, on @code{xterm} |
6bf7aab6 | 456 | @item TERM |
0ec1f115 | 457 | The type of the terminal that Emacs is using. This variable must be |
6bf7aab6 DL |
458 | set unless Emacs is run in batch mode. On MS-DOS, it defaults to |
459 | @samp{internal}, which specifies a built-in terminal emulation that | |
b370b3b0 EZ |
460 | handles the machine's own display. If the value of @env{TERM} indicates |
461 | that Emacs runs in non-windowed mode from @code{xterm} or a similar | |
462 | terminal emulator, the background mode defaults to @samp{light}, and | |
463 | Emacs will choose colors that are appropriate for a light background. | |
6bf7aab6 DL |
464 | @item TERMCAP |
465 | The name of the termcap library file describing how to program the | |
60a96371 | 466 | terminal specified by the @env{TERM} variable. This defaults to |
6bf7aab6 DL |
467 | @file{/etc/termcap}. |
468 | @item TMPDIR | |
469 | Used by the Emerge package as a prefix for temporary files. | |
470 | @item TZ | |
94c3309f | 471 | This specifies the current time zone and possibly also daylight |
3e40caf4 | 472 | saving time information. On MS-DOS, if @code{TZ} is not set in the |
94c3309f | 473 | environment when Emacs starts, Emacs defines a default value as |
9c3aede4 | 474 | appropriate for the country code returned by DOS. On MS-Windows, Emacs |
94c3309f | 475 | does not use @code{TZ} at all. |
6bf7aab6 | 476 | @item USER |
60a96371 | 477 | The user's login name. See also @env{LOGNAME}. On MS-DOS, this |
6bf7aab6 DL |
478 | defaults to @samp{root}. |
479 | @item VERSION_CONTROL | |
480 | Used to initialize the @code{version-control} variable (@pxref{Backup | |
481 | Names}). | |
482 | @end table | |
483 | ||
484 | @node Misc Variables | |
485 | @appendixsubsec Miscellaneous Variables | |
486 | ||
487 | These variables are used only on particular configurations: | |
488 | ||
60a96371 | 489 | @table @env |
6bf7aab6 | 490 | @item COMSPEC |
ec22060b EZ |
491 | On MS-DOS and MS-Windows, the name of the command interpreter to use |
492 | when invoking batch files and commands internal to the shell. On MS-DOS | |
493 | this is also used to make a default value for the @env{SHELL} environment | |
494 | variable. | |
6bf7aab6 DL |
495 | |
496 | @item NAME | |
60a96371 | 497 | On MS-DOS, this variable defaults to the value of the @env{USER} |
6bf7aab6 DL |
498 | variable. |
499 | ||
500 | @item TEMP | |
501 | @itemx TMP | |
ec22060b EZ |
502 | On MS-DOS and MS-Windows, these specify the name of the directory for |
503 | storing temporary files in. | |
6bf7aab6 DL |
504 | |
505 | @item EMACSTEST | |
506 | On MS-DOS, this specifies a file to use to log the operation of the | |
507 | internal terminal emulator. This feature is useful for submitting bug | |
508 | reports. | |
509 | ||
510 | @item EMACSCOLORS | |
9c3aede4 RS |
511 | On MS-DOS, this specifies the screen colors. It is useful to set them |
512 | this way, since otherwise Emacs would display the default colors | |
513 | momentarily when it starts up. | |
514 | ||
515 | The value of this variable should be the two-character encoding of the | |
6bf7aab6 DL |
516 | foreground (the first character) and the background (the second |
517 | character) colors of the default face. Each character should be the | |
518 | hexadecimal code for the desired color on a standard PC text-mode | |
47d7776c | 519 | display. For example, to get blue text on a light gray background, |
ed50f966 | 520 | specify @samp{EMACSCOLORS=17}, since 1 is the code of the blue color and |
47d7776c | 521 | 7 is the code of the light gray color. |
6bf7aab6 DL |
522 | |
523 | The PC display usually supports only eight background colors. However, | |
524 | Emacs switches the DOS display to a mode where all 16 colors can be used | |
525 | for the background, so all four bits of the background color are | |
526 | actually used. | |
527 | ||
528 | @item WINDOW_GFX | |
529 | Used when initializing the Sun windows system. | |
530 | @end table |