help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: (kill-buffer "*scratch*")


From: Drew Adams
Subject: RE: (kill-buffer "*scratch*")
Date: Thu, 23 Sep 2004 13:45:08 -0700

Just to make sure you also know these alternatives:

 - Instead of using buffer *scratch*, you can always use a different buffer
in Emacs Lisp mode. Find-file foo.el, for instance.

 - You can `write-file' buffer *scratch* into a file, to save its contents.

Buffer *scratch* is just a buffer in Emacs Lisp mode, more or less.




Kevin Rodgers <ihs_4664@yahoo.com> writes:

>  > I think I wrote it in the scratch buffer and closed emacs without
>  > saving it.
>  > Of course, emacs didn't asked me if I would like to save it.
>
> But it did tell you:
>
> ;; This buffer is for notes you don't want to save, and for Lisp
evaluation.
> ;; If you want to create a file, visit that file with C-x C-f,
> ;; then enter the text in that file's own buffer.
>
> Try adding this to your .emacs file:
>
> (save-excursion
>    (set-buffer "*scratch*")
>    (setq buffer-offer-save t))

Excellent idea.  I'm adding this to my .emacs right away, and thanks.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]