home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!news.claremont.edu!ucivax!noiro.acs.uci.edu!nntpsrv
- From: cedman@714-725-3165.nts.uci.edu (Carl Edman)
- Subject: Re: Emacs environment variable lost
- Nntp-Posting-Host: 714-725-3165.nts.uci.edu
- Message-ID: <2A702636.22178@noiro.acs.uci.edu>
- Newsgroups: comp.sys.next.sysadmin
- Reply-To: cedman@golem.ps.uci.edu (Carl Edman)
- Lines: 22
- Date: 24 Jul 92 15:48:06 GMT
- References: <CMOORE.92Jul24092902@zenobia.mit.edu>
-
- Christopher B. Moore writes
- > I've noticed (while installing the Auc-TeX package)
- > that evaluation of (getenv "HOSTTYPE") in an Emacs2.1
- > window started by clicking on the Emacs2.1 icon in the
- > workspace returns nil. However, in an Emacs2.1 window
- > started from the commandline it returns "next". What
- > gives?
-
- Why, environment variables aren't global - they are inherited. And the parent
- of all programs started by the Workspace is (surprise !) Workspace. And
- Workspace does not have any environment variables set. If you start a NeXTstep
- program directly from the commandline its parent is the shell so your
- application inherits all the shell environment variables. (BTW, the better way
- to do this is not to start applications directly from the command line but
- instead to tell Workspace to do it from the command line, see man page on
- open(1)).
-
- EPS wrote a hack to get enviroment variables for the Workspace which involved
- installing a shell script as Workspace replacement. This shell script then sets
- the environment variables and execs the real Workspace.
-
- Carl Edman
-