Post by Michael HeerdegenPost by Dieter BritzSometimes in an emacs session, my thick fingers type
;; This buffer is for text that is not saved, and for Lisp evaluation.
;; To create a file, visit it with C-x C-f and enter text in its buffer.
How do I get out of that and back into my editing session?
You've just switched to the *scratch* buffer. You want to
switch back to your previous buffer.
The easiest way is C-x b. You are prompted for a buffer name.
The default should be the buffer you want in your case, so you
can just confirm with RET.
You can also use a buffer menu (C-x C-b, or M-x ibuffer).
`winner-mode' also comes handy, then you can switch to the
previous window config with one key, similar to `undo', when you
have enabled the mode.
Also, you can use the "Buffers" menu in the menu bar. From here
you can switch to any buffer.
(Navigating your buffers from the menu is not as powerful as
`switch-buffer' (C-x b) and `list-buffers' (C-x C-b) (suggested by
Michael) but it might be easier to remember, and if you only have
one buffer (or three, maybe, counting *scratch* and *Messages*),
it should be sufficient.)
Also from the "Buffers" menu in the menu bar, you can run
`next-buffer' and `previous-buffer' to cycle through your
buffers. By default they are bound to C-x <right> and C-x <left>.
Perhaps you are inadvertently using C-x <right> or C-x <left> when
you accidentally switch buffers? To find out, the next time this
happens you can look at your most recent keystrokes ("lossage")
with C-h l.
N.