Sometimes in an emacs session, my thick fingers type
something wrong, and I go into this state:
;; 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?
Dieter Britz <dieterhansbritz@gmail.com> writes:
Sometimes in an emacs session, my thick fingers type
something wrong, and I go into this state:
;; 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.
M-x bury-buffer does that in one step (I have it bound on C-x y), and also gets the *scratch* buffer "out of the way" (which would otherwise be the default on the next C-x b).
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 457 |
Nodes: | 16 (3 / 13) |
Uptime: | 119:25:10 |
Calls: | 9,327 |
Calls today: | 7 |
Files: | 13,534 |
Messages: | 6,081,116 |