![]() |
James Thornton |
| Internet Business Consultant |
| Home | Blog | Bio | Projects | Contact | Latest Blog (new site): How to Get to Genius |
|---|
AE.5 Environment VariablesThe 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
and here's how to do it in csh or tcsh:
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.
This document was generated on April 2, 2002 using texi2html |
|
James Thornton, jamesthornton.com>Services: E Commerce |
Electric Speed: Unix Consultant |