110

I want to hide the welcome screen.

My .emacs file:

 (setq c-basic-offset 4) ; indents 4 chars
 (setq tab-width 4)          ; and 4 char wide for TAB
 (setq indent-tabs-mode nil) ; And force use of spaces
 
 (turn-on-font-lock)       ; same as syntax on in Vim
 
 (setq width (max width (+ (length str) 1)))   ;line numbers
 
 (setq inhibit-splash-screen t)         ; hide welcome screen

I have tried to run the last line of code in my .emacs unsuccessfully.

How can you hide the welcome screen in Emacs?

Gray
  • 115,027
  • 24
  • 293
  • 354
Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697

6 Answers6

202

Add the following to your $HOME/.emacs:

(setq inhibit-startup-screen t)

The next time you start Emacs, the welcome screen shouldn't appear. If you already have Emacs open with the welcome screen, you can kill it with C-x k (Control-x, then k).

Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697
Bastien Léonard
  • 60,478
  • 20
  • 78
  • 95
  • 10
    That's the ticket. Note that inhibit-splash-screen is a relatively new name for the variable (can't remember if it's emacs 22 or 23 that introduced it). Before that, use inhibit-startup-message as Bastien says. – Jarret Hardie Apr 13 '09 at 17:33
  • 4
    Actually you can just kill it by pressing `q`. – Robin Green Aug 31 '14 at 11:50
29
(setq inhibit-splash-screen t)
(setq inhibit-startup-message t)

Alternatively you could:

alias emacs='emacs --no-splash'
Rob Wells
  • 36,220
  • 13
  • 81
  • 146
  • 3
    My `emacs` says that `inhibit-splash-screen` is an alias for `inhibit-startup-screen`. – x-yuri Apr 13 '15 at 15:23
  • 1
    In fact both `inhibit-splash-screen` `inhibit-startup-message` are just aliases for `inhibit-startup-screen`. – mimoralea Sep 01 '16 at 15:44
  • 1
    Bear in mind that you'll need to do this for every shell you use. IMO you're better off configuring the editor properly to begin with, good quickfix suggestion though. – byxor Jul 12 '17 at 20:52
19

You can easily do it through emac's menus...

Options -> customize emacs -> top-level customization group

then select environment group, then initialization, and set inhibit startup screen to on.

Zack Marrapese
  • 12,072
  • 9
  • 51
  • 69
5

In Emacs 24, inhibit-splash-screen and inhibit-startup-message are alias for inhibit-startup-screen, so simply add (setq inhibit-startup-screen t) to your .emacs file will solve the problem.

Given that configuration, your startup buffer is now *scratch*, if you want to further change the default buffer, M-h v initial-buffer-choice <RET> will help.

Official document: http://www.gnu.org/software/emacs/manual/html_node/elisp/Startup-Summary.html

Joshz
  • 594
  • 5
  • 12
5

In my .emacs I have (setq inhibit-startup-message t) and that works for me.

The gnu emacs manual says inhibit-startup-message is the old version and inhibit-splash-screen is the newer version. I don't know in which version that changed. http://www.gnu.org/software/emacs/manual/html_node/emacs/Initial-Options.html

zimbu668
  • 1,295
  • 10
  • 12
4

You can use set initial-scratch-message variable to nil to hide the initial message or set anything you want to display your message.

(setq initial-scratch-message nil)

or

(setq initial-scratch-message ";; Happy Hacking")

Hope it helped.

NgaNguyenDuy
  • 1,306
  • 17
  • 13