2

With emacs -Q if you M-x server-start, then open a buffer, then back in the terminal emacsclient --tty SOMEOTHERFILE a new frame will be created, but it will initially show the buffer shown in the original frame prior to displaying the file/buffer specified on the command line.

I know this is a visual nit, but it's distracting. Is there a way to prevent this from happening? Either by showing the scratch buffer initially or loading straight in to the file specified at the command line?

0

This is apparently not possible at the moment, this is just the way it works. It is possible to change this behavior, but it would require restructuring how server-process-filter works.

Eli Zaretskii writes:

The reason is simple: the way server.el is written, we first create the client frame, and only then show the file there. So the frame is created with no file to visit, and Emacs always shows the last buffer in the new frame in those cases.

See http://lists.gnu.org/archive/html/bug-gnu-emacs/2017-05/msg00502.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.