13

After the init file has done loading I get this message in the minibuffer:

For information about GNU Emacs and the GNU system, type C-h C-a.

What is it being triggered by and how do I change it?

4 Answers 4

24

display-startup-echo-area-message triggers this little advertisement unless you're using customize and have set it there or have it set in your user-init-file (because it actually goes ahead and scans this file for something looking like that, see the definition of display-startup-echo-area-message for the gory details).

There is a way to replace it with something completely different though, simply by redefining it in your Emacs configuration:

(defun display-startup-echo-area-message ()
  (message "Let the hacking begin!"))
5
  • Is there any way to completely disable it?
    – alper
    Jun 14, 2020 at 15:04
  • Call message with nil or the empty string.
    – wasamasa
    Jun 14, 2020 at 16:37
  • Should I put ' before nil as: 'nil
    – alper
    Jun 15, 2020 at 5:27
  • No need, nil doesn't require quoting.
    – wasamasa
    Jun 15, 2020 at 9:53
  • This works like a charm. (setq inhibit-startup-echo-area-message t) does not work for me.
    – jdhao
    Oct 13, 2021 at 9:33
4

This is being triggered by display-startup-echo-area-message, which gets called at startup time.

This particular message is made intentionally difficult to remove (I guess because the GNU project feels they need the advertisement). You can still disable it by customizing inhibit-startup-echo-area-message:

M-x customize-variable inhibit-startup-echo-area-message RET
2
  • Sorry but, am I the only one who tried this tip without seeing any changes?
    – Nsukami _
    Sep 29, 2014 at 23:44
  • FYI: it was made intentionally difficult for the case where Emacs is installed by a sysadmin on a machine shared by many users, so the sysadmin can't just set inhibit-startup-echo-area-message to t globally. It's probably a relatively rare use-case nowadays.
    – Stefan
    Oct 31, 2014 at 19:32
2

The Help Text for inhibit-startup-echo-area-message states:

Non-nil inhibits the initial startup echo area message. Setting this variable takes effect only if you do it with the customization buffer or if your init file contains a line of this form:

(setq inhibit-startup-echo-area-message "YOUR-USER-NAME")

If your init file is byte-compiled, use the following form instead:

(eval '(setq inhibit-startup-echo-area-message "YOUR-USER-NAME"))
1
  • This does not work. The annoying message is still shown.
    – jdhao
    Oct 13, 2021 at 9:25
2

If you use an Emacs config shared between machines (eg. through version control) and can't enter your username explicitly, you can use:

(put 'inhibit-startup-echo-area-message 'saved-value t)
(setq inhibit-startup-echo-area-message (user-login-name))

...as per advice from the bug mailing list. This sets the saved-value property on the variable inhibit-startup-echo-area-message before setting it to your login name, which circumvents the intended safety feature (of leaving a user with no instructions for getting help if they copy and paste init code).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.