From 230034642af1b9b756d5bf155c0bb711bb56cf2c Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Mon, 30 Aug 2021 22:42:27 +0100 Subject: [PATCH] chore(emacs): improve emacs binary setup Check for and use /Applications/Emacs.app/Contents/MacOS/bin/emacs if it exists. --- zshenv | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/zshenv b/zshenv index bb12967..aef9ec0 100644 --- a/zshenv +++ b/zshenv @@ -152,12 +152,11 @@ export EMACSCLIENT="emacsclient" # On macOS we want to use the Emacs.app application bundle if [[ "$OSTYPE" == "darwin"* ]]; then - if [ -f "/Applications/Emacs.app/Contents/MacOS/Emacs" ]; then + path_prepend "/Applications/Emacs.app/Contents/MacOS/bin" + if [ ! -f "/Applications/Emacs.app/Contents/MacOS/bin/emacs" ] && \ + [ -f "/Applications/Emacs.app/Contents/MacOS/Emacs" ]; then export EMACS="/Applications/Emacs.app/Contents/MacOS/Emacs" fi - if [ -f "/Applications/Emacs.app/Contents/MacOS/bin/emacsclient" ]; then - export EMACSCLIENT="/Applications/Emacs.app/Contents/MacOS/bin/emacsclient" - fi fi # Use custom tmux install if available