From 9249943ea607123e1236af9cda305f55388dc6af Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sun, 21 Jun 2015 20:38:48 -0400 Subject: [PATCH] reattach-to-user-namespace for emacs. --- dotfiles/lib/editor.sh | 7 ++++++- dotfiles/lib/shellenv/emacs.sh | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/dotfiles/lib/editor.sh b/dotfiles/lib/editor.sh index 0145f0c1..3b6d637f 100755 --- a/dotfiles/lib/editor.sh +++ b/dotfiles/lib/editor.sh @@ -1,3 +1,8 @@ #!/usr/bin/env zsh -emacsclient "$@" +if is_osx; then + reattach-to-user-namespace emacsclient "$@" +else + emacsclient "$@" +fi + return 0 diff --git a/dotfiles/lib/shellenv/emacs.sh b/dotfiles/lib/shellenv/emacs.sh index 65c50923..a60e9a0b 100644 --- a/dotfiles/lib/shellenv/emacs.sh +++ b/dotfiles/lib/shellenv/emacs.sh @@ -9,8 +9,8 @@ # alias terminal_emacs='_emacs -t' # is_ssh && emacs="terminal_emacs" -alias emacs='emacsclient -tn' -is_osx && alias emacs='emacsclient -cn' +alias emacs='emacsclient -t -n' +is_osx && alias emacs='reattach-to-user-namespace emacsclient -c -n' function kill_all_emacs { emacs_pids | xargs kill -9