From d4c96992ad2fb75fb4965de2665c61bbd6e67651 Mon Sep 17 00:00:00 2001 From: Ade Attwood Date: Sun, 21 Nov 2021 16:13:12 +0000 Subject: [PATCH] refactor(shell): remove emacs zsh plugin and create my own This dose the same thing as the built in oh-my-zsh plugin but this one can update the paths to emacs that it will be used. This will allow you to use a custom compiled version of emacs for testing and / or pinning the version you want with the features you need. --- site-modules/core/files/oh-my-zsh/custom/emacs.zsh | 11 +++++++++++ site-modules/core/files/zshrc | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 site-modules/core/files/oh-my-zsh/custom/emacs.zsh diff --git a/site-modules/core/files/oh-my-zsh/custom/emacs.zsh b/site-modules/core/files/oh-my-zsh/custom/emacs.zsh new file mode 100644 index 0000000..560d993 --- /dev/null +++ b/site-modules/core/files/oh-my-zsh/custom/emacs.zsh @@ -0,0 +1,11 @@ + +# export EMCAS_BINARY="/usr/bin/emacs" +# export EMACS_CLIENT="/usr/bin/emacsclient" +export EMACS_BINARY="$HOME/Code/src/github.com/emacs-mirror/emacs/src/emacs" +export EMACS_CLIENT="$HOME/Code/src/github.com/emacs-mirror/emacs/lib-src/emacsclient" + +export EMACS_PLUGIN_LAUNCHER="$EMACS_CLIENT --alternate-editor '$EMACS_BINARY --daemon && $EMACS_CLIENT'" + +alias emacs="$EMACS_PLUGIN_LAUNCHER --no-wait" +alias e=emacs +alias te="$EMACS_PLUGIN_LAUNCHER -nw" diff --git a/site-modules/core/files/zshrc b/site-modules/core/files/zshrc index 30302cd..21d0f60 100644 --- a/site-modules/core/files/zshrc +++ b/site-modules/core/files/zshrc @@ -27,7 +27,7 @@ COMPLETION_WAITING_DOTS="true" # More plug-ins are loaded in ~/.oh-my-zsh/custom/lib/misc.zsh file so we dint # have to define all of the custom installed plug ins here. # -plugins=(git emacs nvim extract) +plugins=(git nvim extract) # # map ecs to caps lock