OS: OS X 10.9.5, Mavericks
GNU Emacs 24.3.1 (x86_64-apple-darwin13.1.0, Carbon Version 1.6.0 AppKit 1265.19) of 2014-04-03 on Rainers-MacBook-Pro-3.local
I installed emacs via homebrew from railwaycat and it works nicely - no complaints. I do not use emacs in the termoinal, and I usually start it via the Application.
As I said - I am happy so far.
I just have one thing I did not manage to get right (which worked nicely under linux before), which is:
- get emacs daemon starting upon login
- using emacsclient to open
- close emacsdaemon and save al files upon logoff
Any working recipes which could help me to set this up?
Added information
To start an emacs daemon upon login
I created an Automator Application executing the bash command
/usr/local/bin/emacs --daemon
and added it to the Login Items which works nicely.
Utilising daemon from terminal
I can utilise the emacs daemon by using
emacsclient .bashrc
which opens .bashrc in an emacs terminal session.
Utilising from GUI
Now remains the question: how can I utilise it from the GUI?
As I understand the emacsclient, I can not open an emacsclient unless I specify a file to open.
I would like to open an emacsclient GUI and open all files which were previously opened? Is this possible?
I found out that I can use
emacsclient -c
in a terminal to do what I want - but can I do the same for the GUI?
emacsclient
isn't an App as far as OS X is concerned, onlyEmacs
is (and only if it has been installed that way). Why don't you just use the system key bindings for selecting an open application/window? (Won't work if Emacs was started in daemon mode and there is no frame ("window") yet).