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