emacs-devel
[Top][All Lists]
Advanced

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

Re: *scratch* buffer (was: A wish, a plea)


From: David Reitter
Subject: Re: *scratch* buffer (was: A wish, a plea)
Date: Fri, 22 Jun 2007 15:17:54 +0100

On 22 Jun 2007, at 12:57, Jason Rumney wrote:

David Reitter wrote:
I am also intending to make the *scratch* buffer persistent across
sessions.
That way, users will not be bothered to give it a name and to
explicitly save it. But they will retain its contents across crashes
and intentional restarts.

That might be a good idea if there is a simple and obvious command to
clear it when the user wants to start afresh.

I was thinking of mark-whole-buffer, then delete (whatever keys are bound to that). That seems obvious to me.

Giving *scratch* the right buffer-file-name and turning on auto-save- mode is easy enough. If the file exists, its contents are loaded at startup and saved upon quit without user interaction.

One could generalize that mechanism with a customization variable:

persistent-buffers:
(("*scratch*" . "~/.emacs.scratch"))

so that the user can add further persistent buffers or remove the *scratch* buffer to turn of persistency.

I'm not sure about how useful this would be -?





reply via email to

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