switch reattach to user namespace to as current user in emacs.sh.

This commit is contained in:
Ivan Malison 2014-10-27 21:30:32 -07:00
parent b7639346e1
commit 1936f63f3a

View File

@ -10,11 +10,11 @@ function _emacs {
echo "Starting emacs with server name '$server_name'" echo "Starting emacs with server name '$server_name'"
\emacs --daemon="$server_name" \emacs --daemon="$server_name"
fi fi
emacsclient $* --server-file="$server_name" local command="emacsclient $* --server-file=$server_name"
if hash reattach-to-user-namespace 2> /dev/null; then if is_osx; then
reattach-to-user-namespace emacsclient $* --server-file=$server_name as_current_user $command
else else
emacsclient $* --server-file=$server_name $command
fi fi
} }