Article View: comp.sys.next.sysadmin
Article #271Re: Emacs environment variable lost
From: Magnus Nordborg
Date: Mon, 27 Jul 1992 23:59
Date: Mon, 27 Jul 1992 23:59
53 lines
2172 bytes
2172 bytes
In article <1992Jul24.145633.28258@cs.sfu.ca> patrice@cs.sfu.ca (Patrice
Belleville) writes:
> From article <CMOORE.92Jul24092902@zenobia.mit.edu>, by
cmoore@zenobia.mit.edu (Christopher B. Moore):
> >
> > 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?
> >
> > Christopher B. Moore
> > cmoore@maggie.mit.edu
>
>
> Well, the problem is that the workspace does not run your .login
or
> your .cshrc. So programs started from it will not have access to
your
> favorite environment variables. One fix is to add the following lines to
your
> ..emacs file:
>
> (setq process-environment (append
> process-environment
> '("HOSTTYPE=next" "OTHERVAR=othervalue" [more of these])))
>
>
> --
>
/*************************************************************************
**\
> |* Patrice Belleville
patrice@cs.sfu.ca *|
> |* --- Simon Fraser University is not responsible for my mistakes. ---
*|
>
\*************************************************************************
**/
This only fixes some problems -- the *best* solution has been posted here
before and is to rename emacs to (say) real_emacs and then write a script
called emacs with the following content (replace tcsh with your favorite):
#!/usr/local/bin/tcsh
/usr/bin/real_emacs $1
--
Magnus Nordborg
Department of Biological Sciences
Stanford University
magnus@fisher.stanford.edu (NeXT mail preferred)
Technical Details
Message-ID:
<1992Jul27.235900.10468@leland.Stanford.EDU>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!leland.Stanford.EDU!newsReferences:
<1992Jul24.145633.28258@cs.sfu.ca>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.sysadmin Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!leland.Stanford.EDU!news From: magnus@Fisher.Stanford.EDU (Magnus Nordborg) Subject: Re: Emacs environment variable lost Message-ID: <1992Jul27.235900.10468@leland.Stanford.EDU> Sender: news@leland.Stanford.EDU (Mr News) Organization: DSO, Stanford University References: <1992Jul24.145633.28258@cs.sfu.ca> Distribution: cct Date: Mon, 27 Jul 92 23:59:00 GMT Lines: 53