<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 19, 2014 at 9:05 PM, Tim Johnson <span dir="ltr">&lt;<a href="mailto:tim@akwebsoft.com" target="_blank">tim@akwebsoft.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":3me" class="a3s" style="overflow:hidden">I&#39;ve installed emacs 24.<br>
<br>
If I do<br>
which -a emacs<br>
<br>
I get<br>
/opt/local/bin/emacs ## New emacs<br>
/usr/bin/emacs       ## Old emacs<br></div></blockquote></div><div class="gmail_extra"><br></div>1. &quot;which&quot; lies a lot. use &quot;type&quot;.</div><div class="gmail_extra">2. Which one is found depends on a number of things:</div><div class="gmail_extra">  a. the order of directories in $PATH; earlier ones override later ones. (MacPorts install normally puts /opt/local/bin at the front of $PATH.)</div><div class="gmail_extra">  b. most shells do command hashing of some kind (this is one of the reasons that &quot;which&quot; lies, as it usually can&#39;t see either the current value of $PATH or the command hash in your current shell, whereas &quot;type&quot; is required to be a shell builtin that shows what your shell actually &quot;knows&quot;); depending on your shell, &quot;hash -r&quot; or &quot;rehash&quot; will force it to flush its command hash and see changes in $PATH.<br clear="all"><div><br></div><div>And no, the port command can&#39;t reach into your shell and make it do something different automatically, at least not without tricky operations that could make it dump core instead. You must do that yourself.</div><div><br></div>-- <br><div dir="ltr"><div>brandon s allbery kf8nh                               sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>                                  <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div><div>unix, openafs, kerberos, infrastructure, xmonad        <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div>
</div></div>