I am trying to run emacsclient
with alternate-editor of emacs --eval "(setq server-name '\"server1\")"
. I am not having any luck.
This is what I have tried:
lispExp="(setq server-name '\"server1\")"
emacsclient -c --alternate-editor="emacs --eval $lispExp"
So how do I define an alternate editor with arguments, for emacsclient
.
Background:
I am trying to make a bash command (edit
) that when I use it to edit a file, it will connect to a local emacs server, or create a new one. With a different server for each virtual desktop. If I can get the above to work then I can substitute server1
for the appropriate server name.
My original alias (for one server) is defined here:
alias edit='emacsclient --alternate-editor="" --no-wait $*'