switch reattach to user namespace to as current user in emacs.sh.
This commit is contained in:
parent
b7639346e1
commit
1936f63f3a
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user