Add check for display list equals nil
Emacs returns either a sequence of availbale displays or nil. Checking
nil fixes this script to work as expected.
Diff
1diff --git a/plugins/emacs/emacsclient.sh b/plugins/emacs/emacsclient.sh
2index 38d419813f8e21d37feb6f032ee250abdc4bf748..625201a16bbd106b6dcb2e5489e63c480391f58c 100755
3--- a/plugins/emacs/emacsclient.sh
4+++ b/plugins/emacs/emacsclient.sh
5@@ -3,7 +3,7 @@
6 # get list of available X windows.
7 x=`emacsclient --alternate-editor '' --eval '(x-display-list)' 2>/dev/null`
8 9-if [ -z "$x" ] ;then
10+if [ -z "$x" ] || [ "$x" = "nil" ] ;then
11 # Create one if there is no X window yet.
12 emacsclient --alternate-editor "" --create-frame "$@"
13 else