From: Don Armstrong Date: Thu, 23 Feb 2012 03:21:46 +0000 (+0000) Subject: use vi as an alternate editor, test display X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=9a34015a7cd6c205ec82b473d24cb4537ee881a7;p=bin.git use vi as an alternate editor, test display --- diff --git a/sane_editor b/sane_editor index 03aab78..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 [ -z "$DISPLAY" ]; then - exec emacsclient -c -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