I have installed "Emacs for Mac OS X" on my Mac running OS X 10.6.

My question is: how can I run it from a command line to open a file? When I do

$ emacs aFile.txt

It just uses the in window emacs, not the emacs from macosx that I installed.

Thank you.

link|improve this question

62% accept rate
feedback

1 Answer

up vote 0 down vote accepted

open -a Emacs aFile.txt should open it in the UI Emacs. That works for any Mac application, to get it fired up appropriately.

link|improve this answer
Thanks. It works, but when the file does not exit, it said "The file /Users/scheung/a.txt does not exist." how can I make emacs creates a new file name 'aFile.txt' for me? – michael Feb 9 at 5:29
feedback

Your Answer

 
or
required, but never shown

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