From 1936f63f3a1cc863c188491d18d6d228278b34d9 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Mon, 27 Oct 2014 21:30:32 -0700 Subject: [PATCH] switch reattach to user namespace to as current user in emacs.sh. --- dotfiles/lib/shellrc/emacs.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dotfiles/lib/shellrc/emacs.sh b/dotfiles/lib/shellrc/emacs.sh index 34c35434..57b5f41f 100644 --- a/dotfiles/lib/shellrc/emacs.sh +++ b/dotfiles/lib/shellrc/emacs.sh @@ -10,11 +10,11 @@ function _emacs { echo "Starting emacs with server name '$server_name'" \emacs --daemon="$server_name" fi - emacsclient $* --server-file="$server_name" - if hash reattach-to-user-namespace 2> /dev/null; then - reattach-to-user-namespace emacsclient $* --server-file=$server_name + local command="emacsclient $* --server-file=$server_name" + if is_osx; then + as_current_user $command else - emacsclient $* --server-file=$server_name + $command fi }