X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=sane_editor;h=dd1aec75de8f2de3d691b37e27f1702c92605c61;hb=1886c7247cb16ed68a78cd5550b152689a465999;hp=44cf0afa3fd49045b81389c2908d77e21e0dcfd1;hpb=ecb606acccb32483a7aad290547bc5b853094158;p=bin.git diff --git a/sane_editor b/sane_editor index 44cf0af..dd1aec7 100755 --- a/sane_editor +++ b/sane_editor @@ -12,12 +12,10 @@ 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); then - if [ -n "$DISPLAY" ]; then - exec emacsclient -nw "$@"; - else - exec emacsclient -c "$@"; - fi; + if [ -z "$DISPLAY" ]; then + exec emacsclient --alternate-editor /usr/bin/vi -c -nw "$@"; + else + exec emacsclient --alternate-editor /usr/bin/vi -c "$@"; fi; fi; if [ -x /usr/bin/gnuclient ] && [ -x /usr/bin/emacs ]; then