home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / next / sysadmin / 4353 < prev    next >
Encoding:
Internet Message Format  |  1992-07-24  |  1.5 KB

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