GNU Info

Info Node: (emacs)Environment

(emacs)Environment


Next: Display X Prev: Resume Arguments Up: Command Arguments
Enter node , (file) or (file)node

Environment Variables
=====================

   The "environment" is a feature of the operating system; it consists
of a collection of variables with names and values.  Each variable is
called an "environment variable"; environment variable names are
case-sensitive, and it is conventional to use upper case letters only.
The values are all text strings.

   What makes the environment useful is that subprocesses inherit the
environment automatically from their parent process.  This means you
can set up an environment variable in your login shell, and all the
programs you run (including Emacs) will automatically see it.
Subprocesses of Emacs (such as shells, compilers, and version-control
software) inherit the environment from Emacs, too.

   Inside Emacs, the command `M-x getenv' gets the value of an
environment variable.  `M-x setenv' sets a variable in the Emacs
environment.  The way to set environment variables outside of Emacs
depends on the operating system, and especially the shell that you are
using.  For example, here's how to set the environment variable
`ORGANIZATION' to `not very much' using Bash:

     export ORGANIZATION="not very much"

and here's how to do it in csh or tcsh:

     setenv ORGANIZATION "not very much"

   When Emacs is uses the X Window System, it inherits the use of a
large number of environment variables from the X libraries.  See the X
documentation for more information.

General Variables
Environment variables that all versions of Emacs use.
Misc Variables
Certain system-specific variables.

automatically generated by info2www version 1.2.2.9