<br><br><div class="gmail_quote">2012/6/14 R. Mattes <span dir="ltr"><<a href="mailto:rm@mh-freiburg.de" target="_blank">rm@mh-freiburg.de</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Thu, 14 Jun 2012 10:16:31 +0800, Ashi wrote<br>
<div class="im"><br>
> Jimmy, Thanks your advice. However, the exactly emacs's problem is:<br>
> I try to compile the project in emacs, it calls make to do the work.<br>
> And my makefile needs a call to pkg-config to get the libs and<br>
> cflags to complete its work, and pkg-config need the specified<br>
> environment variable of PKG_CONFIG_PATH, which is specified in<br>
> bashrc. And now after move the environment variable setting to<br>
> .bash_profile, emacs compile command works. Thanks again!<br>
<br>
</div>But wouldn't it be easier (and more flexible) to just have emacs invoke<br>
'make' with the right environment? The first time you call 'compile'<br>
from emacs it should prompt you for the command to compile (and probably<br>
offer 'make -k') - you can easily change that to 'PKG_CONFIG_PATH=/foo/bar<br>
make -k'.<br>
With a prefix command 'compile' will always prompt for the command to use.<br>
<br>
HTH Ralf Mattes<br></blockquote><div>A little out topic here, when I call comple in Emacs, it prompts 'make -k' every time, then I need type PKG_CONFIG_PATH=/foo/bar every time:(<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im HOEnZb"><br>
><br>
> 2012/6/13 <<a href="mailto:jimmy.wants.no.spam@gmail.com">jimmy.wants.no.spam@gmail.com</a>><br>
><br>
> On Wed, 13 Jun 2012, 10:10+0800, Ashi <<a href="mailto:ashi08104@gmail.com">ashi08104@gmail.com</a>> wrote:<br>
> > I add the emacs daemon in the autostart.sh to speed up emacs. However, I<br>
> > found the environment variables setted in my bashrc is still not setted in<br>
> > the emacs(emacs would get all current environment variables when it<br>
> > started). So I guess add the needed environment variables to autostart.sh<br>
> > would solve this problem(I've tested, it works). But this solution is a<br>
> > little ugly, I want all setting are kept in one place(such as bashrc). Is<br>
> > there anyway to get this?<br>
><br>
> As a general principle, environment variables should go in ~/.profile or<br>
> a similar file, while .bashrc is for bash-specific non-environment<br>
> related things like setting aliases, prompts, shell options, etc.<br>
><br>
> Move your environment variables (i.e. the ones you have to export) to<br>
> .profile, keeping the syntax portable as more shells than just bash read<br>
> it, and see if that works.<br>
><br>
> Emacs-specific settings should go in an emacs-specific configuration<br>
> file and not in bashrc, of course.<br>
> _______________________________________________<br>
> openbox mailing list<br>
> <a href="mailto:openbox@icculus.org">openbox@icculus.org</a><br>
> <a href="http://icculus.org/mailman/listinfo/openbox" target="_blank">http://icculus.org/mailman/listinfo/openbox</a><br>
><br>
><br>
> --<br>
> Best wishes!<br>
> Ashi<br>
<br>
</div><span class="HOEnZb"><font color="#888888">--<br>
R. Mattes -<br>
Hochschule fuer Musik Freiburg<br>
<a href="mailto:rm@inm.mh-freiburg.de">rm@inm.mh-freiburg.de</a><br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
openbox mailing list<br>
<a href="mailto:openbox@icculus.org">openbox@icculus.org</a><br>
<a href="http://icculus.org/mailman/listinfo/openbox" target="_blank">http://icculus.org/mailman/listinfo/openbox</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Best wishes!<br>zw_yao<br><br>