Setting primary executable instance
Brandon Allbery
allbery.b at gmail.com
Sun Oct 19 18:11:10 PDT 2014
On Sun, Oct 19, 2014 at 9:05 PM, Tim Johnson <tim at akwebsoft.com> wrote:
> I've installed emacs 24.
>
> If I do
> which -a emacs
>
> I get
> /opt/local/bin/emacs ## New emacs
> /usr/bin/emacs ## Old emacs
>
1. "which" lies a lot. use "type".
2. Which one is found depends on a number of things:
a. the order of directories in $PATH; earlier ones override later ones.
(MacPorts install normally puts /opt/local/bin at the front of $PATH.)
b. most shells do command hashing of some kind (this is one of the
reasons that "which" lies, as it usually can't see either the current value
of $PATH or the command hash in your current shell, whereas "type" is
required to be a shell builtin that shows what your shell actually
"knows"); depending on your shell, "hash -r" or "rehash" will force it to
flush its command hash and see changes in $PATH.
And no, the port command can'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.
--
brandon s allbery kf8nh sine nomine associates
allbery.b at gmail.com ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-users/attachments/20141019/f5c187bc/attachment.html>
More information about the macports-users
mailing list