Bringing back a scratch buffer ?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Bringing back a scratch buffer ?

jonetsu
Simple question: If the scratch buffer gets inadvertently deleted, is it
possible to bring it back ?

Reply | Threaded
Open this post in threaded view
|

Re: Bringing back a scratch buffer ?

Tomas Zerolo
On Wed, Dec 04, 2019 at 09:55:17AM -0500, jonetsu wrote:
> Simple question: If the scratch buffer gets inadvertently deleted, is it
> possible to bring it back ?

Depends on what you mean by "bring back" :-)

There /is/ an internal function startup--get-buffer-create-scratch which
creates a *scratch* buffer and puts it in elisp interaction mode. The
nice and warm welcome text won't be there, though.

Coming from the other side, you can just have a buffer named *scratch*
created by just "changing into it" (i.e. C-x b *scratch* <enter>). It
won't be in Lisp interaction mode, though.

Cheers
-- t

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Bringing back a scratch buffer ?

jonetsu
On Wed, 4 Dec 2019 16:14:16 +0100
<[hidden email]> wrote:

> Coming from the other side, you can just have a buffer named *scratch*
> created by just "changing into it" (i.e. C-x b *scratch* <enter>). It
> won't be in Lisp interaction mode, though.

Thanks !  Did not know about that - quite helpful.

Cheers.

Reply | Threaded
Open this post in threaded view
|

Re: Bringing back a scratch buffer ?

Michael Heerdegen
In reply to this post by Tomas Zerolo
<[hidden email]> writes:

> Coming from the other side, you can just have a buffer named *scratch*
> created by just "changing into it" (i.e. C-x b *scratch* <enter>). It
> won't be in Lisp interaction mode, though.

It will (at least in my version of Emacs).

Michael.

Reply | Threaded
Open this post in threaded view
|

Re: Bringing back a scratch buffer ?

Tomas Zerolo
On Wed, Dec 04, 2019 at 05:16:36PM +0100, Michael Heerdegen wrote:
> <[hidden email]> writes:
>
> > Coming from the other side, you can just have a buffer named *scratch*
> > created by just "changing into it" (i.e. C-x b *scratch* <enter>). It
> > won't be in Lisp interaction mode, though.
>
> It will (at least in my version of Emacs).

You're right: if the (new) buffer is named *scratch* it is.

Thanks, cheers
-- tomás

signature.asc (205 bytes) Download Attachment