I use emacs fairly regularly and am trying to configure my system to use emacsclient when possible. To do this I have done the following:
EDITOR='emacsclient -ca emacs' VISUAL='emacsclient -ca emacs'
I then also installed an alternative for /usr/bin/editor that points to /usr/local/bin/emacsclient.wrapper that has the following:
#!/bin/sh #Start emacs client /usr/bin/emacsclient -ca emacs $1
For the most part this works great. However, when emacsclient is launched from the terminal, it often spews out text I don't need. Notably:
$ editor Waiting for Emacs... $
Or, when emacs isn't already started and emacclient has to fall back to starting emacs itself:
emacsclient: can't find socket; have you started the server? To start the server in Emacs, type "M-x server-start".
What can I do to surpress this output? I've tried changing my emacs wrapper to
#!/bin/sh #Start emacs client /usr/bin/emacsclient -ca emacs $1 &> /dev/null
but this didn't help. I didn't try editing EDITOR or VISUAL since I don't have any ideas other than this standard redirection.