summaryrefslogtreecommitdiff
path: root/.shenv
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-12-25 21:13:45 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-12-25 22:31:41 -0700
commitcf40c6ea3f5f9424a8d6f8ab9e4b0b58eb7c860c (patch)
treed9e0691f365f15e534b940014dd43617c815c4db /.shenv
parent561a8baef7acd5e3058133559be635ffeb164327 (diff)
downloaddotfiles-cf40c6ea3f5f9424a8d6f8ab9e4b0b58eb7c860c.tar.gz
integrate new Emacs workstation devel builds
Diffstat (limited to '.shenv')
-rwxr-xr-x.shenv18
1 files changed, 11 insertions, 7 deletions
diff --git a/.shenv b/.shenv
index 6c984b50..602bb4a5 100755
--- a/.shenv
+++ b/.shenv
@@ -11,9 +11,9 @@ set +e
if [ "$DESKTOP_SESSION" = "i3" ] \
|| [ "$DESKTOP_SESSION" = "xfce" ] \
|| [ "XDG_CURRENT_DESKTOP" = "sway" ]; then
- ec="emacsclient -c"
+ ec_opt="-c"
else
- ec="emacsclient -t"
+ ec_opt="-t"
fi
# Either GNU Emacs, or UNIX vi -- lightweight Emacs alternatives like
@@ -21,16 +21,20 @@ fi
# fallback which is almost certainly available and which I can use
# well enough. When GNU Emacs is available, set ALTERNATE_EDITOR to
# the empty string so that an `emacs --daemon` process is spawned
-emacsclient=$(which emacsclient 2>/dev/null)
-if [ -x "$emacsclient" ]; then
- EDITOR="$ec"
+if [ -e "$HOME/src/emacs/admin/README.melete" \
+ -a -x "$HOME/src/emacs/lib-src/emacsclient" \
+ -a -d "/usr/share/emacs-snapshot/site-lisp/elpa" ]; then
+ EDITOR="$HOME/src/emacs/lib-src/emacsclient $ec_opt"
+ ALTERNATE_EDITOR=""
+ export ALTERNATE_EDITOR
+elif command -v emacsclient; then
+ EDITOR="emacsclient $ec_opt"
ALTERNATE_EDITOR=""
export ALTERNATE_EDITOR
else
EDITOR="vi"
fi
-unset ec
-unset emacsclient
+unset ec_opt
export EDITOR
VISUAL="$EDITOR"
export VISUAL