How to open a file from command line and have it shown in one of the existing windows in the existing frame, otherwise in a new window in a new frame? The default behavior is it is opened in a new frame. I'm using
GNU Emacs 23.4.1 (x86_64-apple-darwin10.8.0) of 2012-01-29 on beta.macosforge.org
Edit 1
I didn't pay enough attention to my aliases definition. I'm using
alias emacs=open -a /Applications/Macports/Emacs.app
in my .bashrc
. With this setting, if there is an existing Emacs frame I opened earlier, when a new emacs is run from command line ($ emacs foobar.txt
), it opens a new frame, and even loads .emacs for it, and then displays the file in one of the windows of the new frame. (My .emacs
setting automatically split the frame into two windows.)