]> git.donarmstrong.com Git - bin.git/commitdiff
* fix -n/-z test of sane editor
authorDon Armstrong <don@donarmstrong.com>
Wed, 7 Dec 2011 19:26:31 +0000 (19:26 +0000)
committerDon Armstrong <don@donarmstrong.com>
Wed, 7 Dec 2011 19:26:31 +0000 (19:26 +0000)
sane_editor

index 44cf0afa3fd49045b81389c2908d77e21e0dcfd1..03aab788084f10c99c8b8bd0c264094a39ef9c11 100755 (executable)
@@ -13,9 +13,9 @@ if [ -x /usr/bin/emacsclient ] && [ -x /usr/bin/emacs ]; then
     # reset the tempdir to deal with setuid things clearing it
     export TMPDIR="$(echo ~/tmp)";
     if ( emacsclient -n -e '()' </dev/null >/dev/null); then
-       if [ -n "$DISPLAY" ]; then
-           exec emacsclient -nw "$@";
-       else
+       if [ -z "$DISPLAY" ]; then
+           exec emacsclient -c -nw "$@";
+       else
            exec emacsclient -c "$@";
        fi;
     fi;