Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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)

share|improve this question
2  
Is Aquamacs not an option for you? –  slhck Aug 4 '12 at 11:20
    
Yes, I have have downloaded it now! –  ragnarius Aug 4 '12 at 11:55

2 Answers 2

up vote 3 down vote accepted

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

share|improve this answer

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.

share|improve this answer
    
Thanks, this is great to know! –  ragnarius Aug 5 '12 at 10:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.