I start my emacs daemon from a systemd unit. In such, I provide a name for the emacs socket (see here).
As it is, check_emacsclient fails on the second if, as it cannot find the correct socket.
I attempted to parametrize this in the following manner:
EMACS_SOCKET_NAME=""
emacsclient() {
if [ -n "$EMACS_SOCKET_NAME" ]; then
command emacsclient -s "$EMACS_SOCKET_NAME" "$@"
else
command emacsclient "$@"
fi
}
And modifying main as:
main() {
...
-s|--socket-name)
EMACS_SOCKET_NAME="$1"
shift
;;
...
However, I was not able to make it work, and the following echo "foobar" | mxp --socket-name apolloemacs yields, in my case, an exit status of 1 (even after removing set -x).
I would like to provide such support, would you care to point me in the right direction?
I start my emacs daemon from a systemd unit. In such, I provide a name for the emacs socket (see here).
As it is,
check_emacsclientfails on the second if, as it cannot find the correct socket.I attempted to parametrize this in the following manner:
And modifying
mainas:However, I was not able to make it work, and the following
echo "foobar" | mxp --socket-name apolloemacsyields, in my case, an exit status of 1 (even after removingset -x).I would like to provide such support, would you care to point me in the right direction?