Saturday, August 15, 2009

Emacs 23

Emacs version 23.1 is now stable. I have deployed it on several Linux machines and on my Macbook Pro. Emacs 23 natively supports OS X [1] (support for the NeXTstep APIs was integrated into CVS in July 2008 [2]), so building on OS X gives me an that runs as a Cocoa app.

Emacs 23 adds support for daemon mode (via "emacs --daemon"), which is like Emacs Server in that you can connect to it and open files using emacsclient, except that you do not have to have any frame open. I use the following shell aliases to send files to the daemon, run Emacs commands, and open new frames:
# start a windowed frame
alias ec="emacsclient -n -c -a emacs"

# start a terminal frame
alias em="emacsclient -t -a emacs -nw"

# do not start a new frame
alias ea="emacsclient -n -a emacs"
I also set EDITOR so that most programs use the daemon to open files:
export EDITOR="emacsclient -t"
I use daemon mode like GNU Screen, though I also leave Emacs terminal frames open inside Screen windows.

No comments:

Post a Comment