Skip to content
Browse files

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.
  • Loading branch information...
1 parent ffc17b6 commit c451ff4bf317188da20bfe18021a93640d54133b @jehrhardt jehrhardt committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 plugins/emacs/emacsclient.sh
View
2 plugins/emacs/emacsclient.sh
@@ -3,7 +3,7 @@
# get list of available X windows.
x=`emacsclient --alternate-editor '' --eval '(x-display-list)' 2>/dev/null`
-if [ -z "$x" ] ;then
+if [ -z "$x" ] || [ "$x" = "nil" ] ;then
# Create one if there is no X window yet.
emacsclient --alternate-editor "" --create-frame "$@"
else

0 comments on commit c451ff4

Please sign in to comment.
Something went wrong with that request. Please try again.