Felix Natter wrote: > Stefan Bellon <[EMAIL PROTECTED]> writes: > > When using Emacs to start a compilation (e.g. with C-c C-c from C++ > > mode) you get "make -k" as default. The problem I'm experiencing > > is, that I need some shell variables set in the Makefile. I've set > > them in my ~/.bashrc and it works fine if I start Emacs from an > > xterm which has this variable set in its shell. > > > > But when I start Emacs with a function key, then the ~/.bashrc > > obviously isn't executed, the shell variable isn't set and the make > > process fails. > > > > So, how do I tell Emacs always to execute ~/.bashrc in order to get > > at my shell variables?
> You can put your variables both in ~/.bashrc and ~/.bash_profile. > Or you can use (setenv "TEST" "foo"). It looks like I didn't make my problem clear enough. The variables *are* already in ~/.bashrc (and they're exported there). But Emacs only knows about them if I start Emacs from a bash. If I however use a function key I have defined with fvwm, then Emacs doesn't start with the shell as parent and therefore hasn't the variables set. And I'd like Emacs to have those variables set even then. > It's difficult to do this in elisp because `shell-command' starts a > sub-shell (and if you do "export TEST=foo" in a subshell it won't > affect the parent process) Yes, that's the whole point. I want that Emacs itself gets the variables so that all its child processes have them. Greetings, Stefan. -- Stefan Bellon * <mailto:[EMAIL PROTECTED]> * <http://www.sbellon.de/> PGP 2 and OpenPGP keys available from my home page * * * ADVERTISING SPACE FOR HIRE * * * -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]