unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: where is the scratch buffer
Date: Fri, 31 Mar 2006 09:22:25 -0700	[thread overview]
Message-ID: <e0jl1d$ajg$1@sea.gmane.org> (raw)
In-Reply-To: <442cf283$1_1@news.iprimus.com.au>

Gary Weselle wrote:
> "Wolfram Kraus" <kraus@hagen-partner.de> wrote in message
> news:e0ijsp$qvk$1@ork-un.noris.net...
> 
>>Gary Weselle wrote:
>>
>>>a problem which I have not found a solution for.
>>>when I write something in the scratch buffer and save it as a file, then
>>>kill this "file" I lose the scratch buffer, how do I get it back.
>>
>>Just switch to the *scratch* buffer. Emacs will (re)create every
>>non-exiting buffer:
>>C-x b *scratch* [RET]
> 
> well, that is the point, there is not *scratch* in the buffer Menu when C-x
> b is hit.

*scratch* is not there because you implicitly renamed it, by making it
visit the file:

,----[ C-h k C-x C-w ]
| C-x C-w runs the command write-file
|    which is an interactive compiled Lisp function in `files'.
| (write-file FILENAME &optional CONFIRM)
|
| Write current buffer into file FILENAME.
| This makes the buffer visit that file, and marks it as not modified.
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| If you specify just a directory name as FILENAME, that means to use
| the default file name but in that directory.  You can also yank
| the default file name into the minibuffer to edit it, using M-n.
|
| If the buffer is not already visiting a file, the default file name
| for the output file is the buffer name.
|
| If optional second arg CONFIRM is non-nil, this function
| asks for confirmation before overwriting an existing file.
| Interactively, confirmation is required unless you supply a prefix 
argument.
`----

(`C-x C-s' does the same thing.)

BTW, using the *scratch* buffer for new files is not a good idea, since
it is not autosaved (you could lose your work if Emacs crashes -- or
more likely, your computer).

-- 
Kevin Rodgers

      parent reply	other threads:[~2006-03-31 16:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-01  0:45 where is the scratch buffer Gary Weselle
2006-03-31  6:58 ` Wolfram Kraus
2006-04-01  4:12   ` Gary Weselle
2006-03-31  9:26     ` Malte Spiess
2006-03-31 14:44       ` Thien-Thi Nguyen
2006-03-31 16:22     ` Kevin Rodgers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='e0jl1d$ajg$1@sea.gmane.org' \
    --to=ihs_4664@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).