Shammer's Philosophy

My private adversaria

Emacs Server configuration

Emacs can be configured as server mode. Server mode helps to collect all process to view or edit text files by emacsclient.

    1. Add following configuration to init.el
(require 'server)
(unless (server-running-p)
  (server-start))
    1. Add emacsclient alias if several versions emacs are installed on the environment. Here is my Mac environment sample.
if [ -e /Applications/Emacs.app/Contents/MacOS/Emacs ] ; then
    alias emacs='/Applications/Emacs.app/Contents/MacOS/Emacs -nw'
    alias emacsclient='/Applications/Emacs.app/Contents/MacOS/bin/emacsclient'
fi

Darwin includes emacs whose version is 22.1, but I use emacs 24.4 mainly. If server version is different from emacsclient version, some errors may be occurred. So, it is required to equalise the version between Emacs and emacsclient.