Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs 23, OS X, multi-tty and emacsclient

Tags:

emacs

macos

elisp

How can I get emacs 23 working nicely in multi-tty mode on OS X?

I've added (server-start) to my .emacs, and have discovered that running /Applications/Emacs.app/Contents/MacOS/bin/emacsclient -n ~/myfile.txt will open it in my emacs.app, but it doesn't bring emacs to the front.

So, how can I get emacs.app to come to the front when I run emacsclient? (I've considered writing a function that puts the current frame to the front every time a file is opened, or maybe writing an Applescript to do a similar job that could be called at the same time as emacsclient)

Is the emacsclient within emacs.app the best one to use? I assume I'll write an alias to it if so, but it seems weird to be using that rather than something in /usr/local/bin

Has anyone got any other tips or examples of getting this working?

like image 713
Singletoned Avatar asked Jun 03 '09 16:06

Singletoned


1 Answers

I have an alias from emacs to

open -a /Applications/Emacs.app "$@"

If you are annoyed by the fact that it opens a new frame (window) for each file -- add

(setq ns-pop-up-frames nil)

to your .emacs and fixed.

like image 119
mrflip Avatar answered Nov 15 '22 08:11

mrflip