0

I have emacs on OS X that comes pre-installed, and is found in /usr/bin/emacs. It does not allow me to run it as a bg process (using &) and does not present me with a nice GUI.

I therefore installed the GUI package of emacs, which gets installed in /Applications/Emacs.app/Contents/MacOS - the executable name is Emacs.

I want my OS X to always point to /Applications/Emacs.app/Contents/MacOS/Emacs instead of /usr/bin/emacs. I updated my .profile and added the path of graphical Emacs to the PATH.

Now if I run which emacs, it results in:

/Applications/Emacs.app/Contents/MacOS/emacs
  1. Why would this work? Why is the Emacs GUI app now used instead of the pre-installed one?
  2. Why is the system printing 'emacs' in lowercase while the actual application name starts with an upper case?
0

1 Answer 1

1
  1. From the Wikipedia page on PATH:

    When a command name is specified by the user or an exec call is made from a program, the system searches the path, examining each directory from left to right in the list, looking for a filename that matches the command name. Once found, the program is executed as a child process of the command shell or program that issued the command.

  2. The default Mac OSX file system is case-insensitive by default. That is, there is no distinction between /Applications/Emacs.app/Contents/MacOS/Emacs and /Applications/Emacs.app/Contents/MacOS/emacs.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .