summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2023-01-15 12:41:54 +0000
committerGrégoire Duchêne <gduchene@awhk.org>2023-01-15 13:22:16 +0000
commit8c4ca999c2487e32f4bba59ebcb826b6d72d6d13 (patch)
tree2cca43ddf2ee882513c81d7029bea04d9de0a015
parentb05b52881207b134c6ab08710ae55ac421faea9b (diff)
darwin/zsh: Switch back to Homebrew-provided Emacs
-rwxr-xr-xdotfiles-darwin/bin/env.sh17
-rw-r--r--dotfiles-darwin/zsh/profile5
-rw-r--r--dotfiles-darwin/zsh/rc7
3 files changed, 1 insertions, 28 deletions
diff --git a/dotfiles-darwin/bin/env.sh b/dotfiles-darwin/bin/env.sh
index 81df501..e9eb62d 100755
--- a/dotfiles-darwin/bin/env.sh
+++ b/dotfiles-darwin/bin/env.sh
@@ -7,20 +7,3 @@ for env in DOMAIN HOST UNAME XDG_{{CACHE,CONFIG,DATA}_HOME,RUNTIME_DIR}; do
echo_log Setting ${env} to “${(P)env}”.
launchctl setenv ${env} ${(P)env}
done
-
-# Some environment variables are magic: setting them with launchctl does
-# not seem to work with Emacs. I’m not sure why, but adding those to
-# Info.plist does work.
-local plist=~/Applications/Emacs.app/Contents/Info.plist
-
-if [[ ! -f ${plist} ]]; then
- echo_log No Info.plist file found at “${plist}”.
- return
-fi
-
-plutil -insert LSEnvironment -dictionary ${plist} 2>/dev/null >&2 || true
-for env in PATH SSH_AUTH_SOCK; do
- echo_log Setting LSEnvironment.${env} in Emacs.app to “${(P)env}”.
- plutil -replace LSEnvironment.${env} -string ${(P)env} ${plist}
-done
-/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f ${plist:h:h}
diff --git a/dotfiles-darwin/zsh/profile b/dotfiles-darwin/zsh/profile
index 8edc3bb..35e5d91 100644
--- a/dotfiles-darwin/zsh/profile
+++ b/dotfiles-darwin/zsh/profile
@@ -2,10 +2,7 @@
() {
local dir
- for dir (
- /usr/local/opt/*/libexec/gnubin(N)
- ~/Applications/Emacs.app/Contents/MacOS/bin
- ); do
+ for dir in /usr/local/opt/*/libexec/gnubin(N); do
[[ -d ${dir} ]] && path=(${dir} ${path})
done
}
diff --git a/dotfiles-darwin/zsh/rc b/dotfiles-darwin/zsh/rc
index 145b177..11bb8f1 100644
--- a/dotfiles-darwin/zsh/rc
+++ b/dotfiles-darwin/zsh/rc
@@ -9,13 +9,6 @@ alias pip=pip3
alias python=python3
alias rsync='rsync --exclude=.DS_Store'
-() {
- local emacs=~/Applications/Emacs.app/Contents/MacOS/Emacs
- if ! which emacs >/dev/null && [[ -x ${emacs} ]]; then
- alias emacs=${emacs}
- fi
-}
-
if (( ${path[(I)/usr/local/opt/coreutils/libexec/gnubin]} )); then
alias ls='ls --color --group-directories-first'
alias lsh='ls -Shrs'