Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit c451ff4bf317188da20bfe18021a93640d54133b 1 parent ffc17b6
Jan Ehrhardt jehrhardt authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  plugins/emacs/emacsclient.sh
2  plugins/emacs/emacsclient.sh
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.