Next: Misc Variables, Up: Environment
Here is an alphabetical list of environment variables that have special meanings in Emacs. Most of these variables are also used by some other programs. Emacs does not require any of these environment variables to be set, but it uses their values if they are set.
cd
command to search for the directory you specify,
when you specify a relative directory name.
data-directory
.
doc-directory
.
load-path
variable (see Lisp Libraries). An empty element
stands for the default value of load-path
; e.g., using
‘EMACSLOADPATH="/tmp:"’ adds /tmp to the front of
the default load-path
. To specify an empty element in the
middle of the list, use 2 colons in a row, as in
‘EMACSLOADPATH="/tmp::/foo"’.
exec-path
(see Shell).
user-mail-address
, which the Emacs mail interface puts into the
‘From’ header of outgoing messages (see Mail Headers).
On MS-Windows, if LANG is not already set in the environment when Emacs starts, Emacs sets it based on the system-wide default language, which you can set in the ‘Regional Settings’ Control Panel on some versions of MS-Windows.
The value of the LC_CTYPE category is
matched against entries in locale-language-names
,
locale-charset-language-names
, and
locale-preferred-coding-systems
, to select a default language
environment and coding system. See Language Environments.
user-full-name
(see Mail Headers).
exec-path
(see Shell).
mail-default-reply-to
(see Mail Headers).
smtpmail-smtp-server
(see Mail Sending).
temporary-file-directory
, which specifies a directory in which
to put temporary files (see Backup). Emacs tries to use
TMPDIR first. If that is unset, Emacs normally falls back on
/tmp, but on MS-Windows and MS-DOS it instead falls back on
TMP, then TEMP, and finally c:/temp.
version-control
variable (see Backup Names).
[1] Here and below, whenever we say “colon-separated list of directories”, it pertains to Unix and GNU/Linux systems. On MS-DOS and MS-Windows, the directories are separated by semi-colons instead, since DOS/Windows file names might include a colon after a drive letter.