14 Jun 2012 11:10
Re: autostart.sh and bashrc
On Thu, 14 Jun 2012 10:16:31 +0800, Ashi wrote > Jimmy, Thanks your advice. However, the exactly emacs's problem is: > I try to compile the project in emacs, it calls make to do the work. > And my makefile needs a call to pkg-config to get the libs and > cflags to complete its work, and pkg-config need the specified > environment variable of PKG_CONFIG_PATH, which is specified in > bashrc. And now after move the environment variable setting to > .bash_profile, emacs compile command works. Thanks again! But wouldn't it be easier (and more flexible) to just have emacs invoke 'make' with the right environment? The first time you call 'compile' from emacs it should prompt you for the command to compile (and probably offer 'make -k') - you can easily change that to 'PKG_CONFIG_PATH=/foo/bar make -k'. With a prefix command 'compile' will always prompt for the command to use. HTH Ralf Mattes > > 2012/6/13 <jimmy.wants.no.spam@...> > > On Wed, 13 Jun 2012, 10:10+0800, Ashi <ashi08104@...> wrote: > > I add the emacs daemon in the autostart.sh to speed up emacs. However, I > > found the environment variables setted in my bashrc is still not setted in > > the emacs(emacs would get all current environment variables when it > > started). So I guess add the needed environment variables to autostart.sh > > would solve this problem(I've tested, it works). But this solution is a > > little ugly, I want all setting are kept in one place(such as bashrc). Is > > there anyway to get this?(Continue reading)
RSS Feed