0

how do you open emacs for OSX? I have it downloaded in my Applications, but I don't know how to open it via my terminal (calling it "emacs test.cpp")..

I checked out some sites, but their solution didn't work for me.

soochism
  • 13
  • 1
  • 5
  • 2
    Possibly a duplicate of [How to launch GUI Emacs from command line in OSX?](http://stackoverflow.com/questions/10171280/how-to-launch-gui-emacs-from-command-line-in-osx) or [How to start “emacsformacosx” in terminal](http://stackoverflow.com/questions/9149868/how-to-start-emacsformacosx-in-terminal) – Chris Forrence Feb 18 '14 at 03:23

2 Answers2

1

I have this in my .bashrc (or .zshrc) file.

alias emacs="open -a Emacs.app"
ysakamoto
  • 2,512
  • 1
  • 16
  • 22
0

ysakamoto's answer is correct. I've taken it a step further, I'm using a shellscript using emacsclient to open a file in a running instance of Emacs, or launch a new one if there's none running. Alternatively, it just focuses Emacs/opens an empty session when I don't give it a file. Take a look.

cbrst
  • 431
  • 5
  • 11