Your subject line is a little confusing, because 'modes' (major and minor) are not the same thing as buffers (modes are applied to buffers, affecting the way you view and interact with them). It sounds as if you actually want to know how to find your original buffer after you have changed to another?
C-x b
is the default binding for switch-to-buffer
. It offers you a default buffer to switch to, which you can do so by pressing RET
. Much of the time the default offered will be the one that you wanted. If not, you can instead press TAB
to see a completion list of all the available buffers. Now just type enough of the name to make it unique, press TAB
again to complete the name for you, and then RET
to select it.
Alternatively, C-x C-b
is the standard binding for the list-buffers
command, which will show you a list of all buffers. You can then use C-x o
to change to the other-window
, move up or down to select the buffer you want to change to, and press RET
to change to it. C-x 1
will then remove the other windows from your emacs display.
Finally, many major modes bind q
to a 'quit' command, which generally buries or deletes that buffer, returning you to the previous one. This isn't guaranteed, but it works in many situations.
(As already mentioned by others, you may potentially need to C-g
or otherwise abort an active command, before you can use these commands.)
That all said, I am thinking that what you really need to do is type C-h t
or M-x help-with-tutorial RET
and read and follow that document. It will answer all of these sorts of questions for you, and many more. Emacs can be complicated, so this would be very well worth your time.