Last Updated: February 25, 2016
·
208
· dparnell

Start emacsclient nicely

This will start emacsclient or emacs as an X app or a console app depending on the type of connection you are using.

#!/bin/sh

SERVER_PATH=~/.emacs.d/server/server

if [ $DISPLAY ]
then
  nohup emacsclient -s $SERVER_PATH -c -a emacs $* > /dev/null &
else
  emacsclient -s $SERVER_PATH -t -a emacs $*
fi