unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* (kill-buffer "*scratch*")
@ 2004-09-23 12:59 Frederic Motte
  2004-09-23 15:34 ` J. David Boyd
  0 siblings, 1 reply; 6+ messages in thread
From: Frederic Motte @ 2004-09-23 12:59 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 588 bytes --]

I hate Emacs' scratch buffer !!!

The other night, I was not able to sleep, thinking about a game world.
So I jumped out of my bed to write it down. Once I was happy of my
work, I went back in bed feeling good.

Today, I wanted to read it again, but impossible to found it back.
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.

I hate Emacs' scratch buffer.

By the way, I didn't mention that I love emacs, thanks a lot.
-- 
Frédéric Motte <fred@lautre.net> http://fred.lautre.net/ PGP-ID:47417232

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: (kill-buffer "*scratch*")
  2004-09-23 12:59 Frederic Motte
@ 2004-09-23 15:34 ` J. David Boyd
  0 siblings, 0 replies; 6+ messages in thread
From: J. David Boyd @ 2004-09-23 15:34 UTC (permalink / raw)


Frederic Motte <fred@lautre.net> writes:

> I hate Emacs' scratch buffer !!!
> 
> The other night, I was not able to sleep, thinking about a game world.
> So I jumped out of my bed to write it down. Once I was happy of my
> work, I went back in bed feeling good.
> 
> Today, I wanted to read it again, but impossible to found it back.
> 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.
> 
> I hate Emacs' scratch buffer.
> 
> By the way, I didn't mention that I love emacs, thanks a lot.


So why not put some code in your .emacs to kill the buffer on start,
and create a real buffer that you will have to save if you type into
it?

Dave

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: (kill-buffer "*scratch*")
       [not found] <mailman.3743.1095944748.1998.help-gnu-emacs@gnu.org>
@ 2004-09-23 15:38 ` Kevin Rodgers
  2004-09-23 19:07   ` J. David Boyd
  2004-09-23 19:48   ` Stefan Monnier
  0 siblings, 2 replies; 6+ messages in thread
From: Kevin Rodgers @ 2004-09-23 15:38 UTC (permalink / raw)


Frederic Motte wrote:
 > The other night, I was not able to sleep, thinking about a game world.
 > So I jumped out of my bed to write it down. Once I was happy of my
 > work, I went back in bed feeling good.
 >
 > Today, I wanted to read it again, but impossible to found it back.
 > 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))

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: (kill-buffer "*scratch*")
  2004-09-23 15:38 ` (kill-buffer "*scratch*") Kevin Rodgers
@ 2004-09-23 19:07   ` J. David Boyd
  2004-09-23 20:45     ` Drew Adams
  2004-09-23 19:48   ` Stefan Monnier
  1 sibling, 1 reply; 6+ messages in thread
From: J. David Boyd @ 2004-09-23 19:07 UTC (permalink / raw)


Kevin Rodgers <ihs_4664@yahoo.com> writes:

> Frederic Motte wrote:
>  > The other night, I was not able to sleep, thinking about a game world.
>  > So I jumped out of my bed to write it down. Once I was happy of my
>  > work, I went back in bed feeling good.
>  >
>  > Today, I wanted to read it again, but impossible to found it back.
>  > 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))
> 
> -- 
> Kevin Rodgers

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

Dave

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: (kill-buffer "*scratch*")
  2004-09-23 15:38 ` (kill-buffer "*scratch*") Kevin Rodgers
  2004-09-23 19:07   ` J. David Boyd
@ 2004-09-23 19:48   ` Stefan Monnier
  1 sibling, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2004-09-23 19:48 UTC (permalink / raw)


> (save-excursion
>    (set-buffer "*scratch*")
>    (setq buffer-offer-save t))

(with-current-buffer "*scratch*"
  (setq buffer-offer-save t))


        Stefan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: (kill-buffer "*scratch*")
  2004-09-23 19:07   ` J. David Boyd
@ 2004-09-23 20:45     ` Drew Adams
  0 siblings, 0 replies; 6+ messages in thread
From: Drew Adams @ 2004-09-23 20:45 UTC (permalink / raw)


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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-09-23 20:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.3743.1095944748.1998.help-gnu-emacs@gnu.org>
2004-09-23 15:38 ` (kill-buffer "*scratch*") Kevin Rodgers
2004-09-23 19:07   ` J. David Boyd
2004-09-23 20:45     ` Drew Adams
2004-09-23 19:48   ` Stefan Monnier
2004-09-23 12:59 Frederic Motte
2004-09-23 15:34 ` J. David Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).