The only way to avoid that message with Emacs earlier than 28.1 is to invoke emacsclient
with the -n
(--nowait
) option.
Starting with Emacs 28.1 (basically, current upstream at the time of writing), there is a variable to do that:
Customizing server-client-instructions
and toggling it off should turn off that message, but I cannot confirm: either my emacs session is curdled or there is something else that's funky.
The doc string of the variable says:
Documentation:
If non-nil, display instructions on how to exit the client on connection.
If nil, no instructions are displayed.
EDIT: after restarting emacs (actually, a newer version that I had installed - this was an opportunity to kill the old emacs and start with the new version), I can see the variable and it does seem to work as described. The explanation here is that I went from a version that did not have the variable to a version that did.
Here's the commit that added the variable.
EDIT (in response to the OP's comment): to customize the variable, ask for its description with C-h v server-client-instructions RET
, hit the customize
link where it says "You can customize
this variable" and when the customize interface comes up, hit the Toggle
button to toggle it off (nil) and then hit Apply and Save
to save it permanently.
emacsclient
, right? In that case you can add the option--no-wait
. The default foremacsclient
is to wait for you to edit the buffer and mark it as done usingC-x #
, hence the message in the minibuffer.emacsclient -t -q <file.py>
to open files. Usually I close it usingC-x C-c
to get back to shell and re-open the same file. I have added--no-wait
parameter but it directly shuts down theemacs
before opening it