Unable to hide welcome screen in Emacs

Emacs

Emacs Problem Overview


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?

Emacs Solutions


Solution 1 - Emacs

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

Solution 2 - Emacs

(setq inhibit-splash-screen t)
(setq inhibit-startup-message t)

Alternatively you could:

alias emacs='emacs --no-splash'

Solution 3 - Emacs

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.

Solution 4 - Emacs

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

Solution 5 - Emacs

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

Solution 6 - Emacs

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionL&#233;o L&#233;opold Hertz 준영View Question on Stackoverflow
Solution 1 - EmacsBastien LéonardView Answer on Stackoverflow
Solution 2 - EmacsRob WellsView Answer on Stackoverflow
Solution 3 - EmacsZack MarrapeseView Answer on Stackoverflow
Solution 4 - Emacszimbu668View Answer on Stackoverflow
Solution 5 - EmacsJoshzView Answer on Stackoverflow
Solution 6 - EmacsNgaNguyenDuyView Answer on Stackoverflow