4

Possible Duplicate:
On OS X, how do I start Cocoa emacs and bring it to front?

I have Emacs for OS X installed on my MacBook Pro. In order to launch Emacs from the command line, I have created a file called /usr/bin/emacs with the following contents:

#!/bin/sh
/Applications/Emacs.app/Contents/MacOS/Emacs "$@"

and I have chmoded the file to make it executable.

However, when I launch emacs from the command line, the emacs GUI window goes to the bottom of the UI stack and the terminal window stays on top. Is there any way I can get the emacs GUI to go to the top of the UI stack?

Arunabh Das
  • 911
  • 1
  • 12
  • 18

1 Answers1

1

You could add something like this:

osascript -e 'tell application "Emacs" to activate'

This will launch an AppleScript event that brings up the Emacs window, wherever it is.

slhck
  • 235,242