emacsclient.sh 333 Bytes
Newer Older
1
2
3
4
5
6
7
8
#!/bin/sh

# Starts emacs daemon if not already started.

x=`emacsclient --alternate-editor '' --eval '(x-display-list)' 2>/dev/null`
if [ -z "$x" ] ;then
    emacsclient --alternate-editor "" --create-frame $@
else
Tristan Carel's avatar
Tristan Carel committed
9
    # prevent creating another X frame if there is at least one present.
10
11
    emacsclient --alternate-editor "" $@
fi