5

On my Mac, I would like to be able to right-click on a file and then select "open with.." emacs.

How can I accomplish that? (On my Mac, I have emacs in /usr/bin)

2
  • 2
    Is Aquamacs not an option for you?
    – slhck
    Aug 4, 2012 at 11:20
  • Yes, I have have downloaded it now!
    – ragnarius
    Aug 4, 2012 at 11:55

2 Answers 2

2

Download the most recent version of Aquamacs which is "standard" Emacs with a lot of essential OS X customization.

7

You can also achieve the result you want with an actual terminal window and the command-line emacs. To do that, open Automator.app from your applications folder, and create a new Application.

Here, from the left, drag Run AppleScript to the right, and paste the following:

on run {input}
    set filepath to quoted form of POSIX path of input
    tell application "Terminal"
        activate
        do script "/usr/bin/emacs " & filepath
    end tell
    return input
end run

Save this anywhere you want, as an .app file. Now, you can right-click on any file, go to Open With… » Other and select your new app. You can also go to Get Info after right-clicking, and under Open With…, set your new emacs-app as a default for all files of this type.

0

You must log in to answer this question.

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