Mailing List Archive

Support open source code!


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

emacs: Losing text in *scratch*



Been a while since I've had a good Emacs rant.

>>>>> "Michael" == Michael Schubart <michael@example.com> writes:

    Michael> How can I configure Emacs to always ask me about saving
    Michael> changed buffers before exiting, even if it's *scratch*?

You don't want to.  Emacs assumes that buffers that are not visiting
files are temporary.  This leaves Emacs free to create buffers behind
the scenes wherever it might be useful, and it does so.  Frequently.
Being asked about those buffers would get old quickly.

Changing this assumption would require changes throughout the Emacs UI
and API, and in all of the applications built with Emacs Lisp.

Just learn to always visit a file (C-x C-f) when you enter Emacs, or
to start Emacs with a filename argument.

    Michael> Or can I somehow get completely rid of *scratch*, the

No, you can't.  Emacs must have an editing buffer to display, so you
can't kill *scratch* on startup.  You can visit a file, thus creating
a buffer which will be autosaved, and then kill *scratch* (C-x k
"*scratch*"), but that seems kinda pointless.

    Michael> point of which I don't quite see anyway?

<RANT>
*scratch* is direct access to the Lisp interpreter; you can write
programs there to do editing tasks or calculations or play games.

*scratch* is the buffer where my two-year-old can't do much harm by
typing into it, since it won't overwrite any files.

*scratch* is where the current version of Emacs gets debugged, and the
next generation of Emacs gets prototyped.

*scratch* is mostly invisible, hidden behind the dozens of buffers
that a well-cared for instance of Emacs accumulates before the admin
reinstalls Linux (the only excuse for ever terminating Emacs in normal
use), but always available for those special cases where the precooked
commands aren't quite sufficient.
</RANT>

- 
University of Tsukuba                Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences       Tel/fax: +81 (298) 53-5091
_________________  _________________  _________________  _________________
What are those straight lines for?  "XEmacs rules."


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links