Version: GNU Emacs (GTK+ Version 3.18.9). Gnome terminal.

When I type in terminal emulator: vim foo/bar.el.

Then I close the Vim session with :wq, I see the content of my Vim screen in the terminal.

When I type in terminal emulator: emacsclient -nw foo/bar.el. And save it and close Emacsclient, I do not see the content of my previous Emacsclient session in the terminal. An example what I mean:

enter image description here

As illustrated in this screenshot above, the output from my Vim session is visible in terminal. With the Emacsclient, it's not the case after closing Emacsclient. Makes me to wonder why? It's basically the same output in Terminal with both editors.

1 Answer 1


This question (or rather the answer to it), has nothing to do with emacs or vim specifically, but to how they interact with the terminal. Emacs simply instructs the terminal to be cleared (or initialized, at any rate) as it exits.

You can see similar behavior with other, simpler, programs as well. Try comparing the result of less foo/bar.el and less -X foo/bar.el.

  • Given the fact that Emacs is all about extensibility, would it be possible to tell Emacs to not instruct the terminal to be cleared?
    – ReneFroger
    May 14, 2016 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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