0

Question:

Because I use emacs-live, I used homebrew to install emacs-24.3. Now everytime I want to launch emacs of version 24.3 in terminal, I have to type "emacs-24.3" --- if I just type "emacs", it launches the original updated emacs came with Mac OS.

how can I configure these so that I only need to type "emacs" and launch the one installed by homebrew?

I use emacs in terminal, so the workaround that installing GUI version of emacs is not the solution what I am looking for. I use OSX Lion.

Note:

Solved the issue by reading this post! the point was to restart my terminal after doing what you guys suggested...

For future visitors I will just post full procedure for solving this issue.

Solution:

  1. Add following line in .bash_profile: PATH="/usr/local/bin:$PATH" as this post explained.

  2. Close the terminal and restart again. If you don't restart, you will be stuck as I did :-)

  • You need to alter your PATH to put /usr/local/bin on the front - which is a duplicate – mmmmmm Sep 21 '13 at 21:31
  • @Mark I did put /usr/local/bin on top of the rests, but it doesn't fix the problem -- typing emacs won't invoke the one installed by brew. Also followed instruction in your link but doesn't fix the problem as well... – Jay Somedon Sep 21 '13 at 21:39
  • → Seven: please insert the output of echo ${PATH} so as to understand why this question already dealt with ( http://apple.stackexchange.com/questions/49389/amending-path-so-that-usr-local-bin-is-ahead-of-usr-bin ) doesn't help you correctly. – dan Sep 21 '13 at 21:51
  • 1
    @Mark Just figured out I didn't restart my terminal! If you can post what you suggested in comment, I want to accept your post as answer :-) – Jay Somedon Sep 21 '13 at 22:07
  • @danielAzuelos Thanks Daniel, I just realized that I didn't restart my terminal looool!! – Jay Somedon Sep 21 '13 at 22:08
  • 1
    → Seven: you don't have to. Every modification of .bash_profile must be followed by: another window opened (to check your shell is still working) and . ~/.bash_profile to load it in your actual shell. – dan Sep 21 '13 at 22:15
  • @danielAzuelos replace the and in the last sentence with an or – mmmmmm Sep 22 '13 at 11:01
  • → Mark: this is an and because, the 1st trick is to ensure that the ~/.bash_profile is error proof, the 2nd trick is to use it now that one knows it is OK. Perhaps should I put it in bold ;). In fact it isn't an and but an &&. – dan Sep 22 '13 at 11:54

0 Answers0