tags:

views:

538

answers:

3

The scratch message always says:

;; 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.

How do I remove this and make the blank scratch message the default?

+6  A: 

You can customize this variable 'initial-scratch-message to be whatever message you want.

(setq initial-scratch-message "")
Trey Jackson
A: 

You can turn off the initial splash screen with

(setq inhibit-startup-message t)

this appears to also remove the initial message in the scratch buffer.

Brad Payne
Doesn't work for me.
Chris Conway
Could it be version specific? I'm running emacs-22.3. The documentation for initial-scratch-message says:Initial message displayed in *scratch* buffer at startup.If this is nil, no message will be displayed.If `inhibit-startup-screen' is non-nil, then no message is displayed,regardless of the value of this variable.(note inhibit-startup-message is an alias for inhibit-startup-screen, at least on my version)
Brad Payne
I'm using Emacs 23.0. Could be an API change.
Chris Conway
Indeed, this looks like an API change. From the NEWS file for Emacs 23.1: The option `inhibit-startup-screen` (with aliases to old names`inhibit-splash-screen` and `inhibit-startup-message`) doesn't inhibit display of the initial message in the *scratch* buffer. If you don't want to display the initial message in the *scratch* buffer at startup, you can set the option `initial-scratch-message` to nil.
Ashutosh Mehra
+2  A: 

For Emacs 23, you can do this:

(setq initial-scratch-message nil)

From the documentation: "Initial message displayed in scratch buffer at startup. If this is nil, no message will be displayed."

Ashutosh Mehra