Skip to content

Disabling Prompts in Emacs

by mickey on November 14th, 2010

I find prompts in Emacs very annoying and in-my-face, so I have gone out of my way to remove or minimize any interaction I have with them.

Let’s start out by getting rid of the “yes or no” prompt and replace it with “y or n”:

Next up is the annoying confirmation if a file or buffer does not exist when you use C-x C-f or C-x b.

If you use ido-mode I recommend disabling the prompt that asks you if you want to create a new buffer if you enter a non-existent buffer in C-x b. You can replace always with never which does the opposite: disables new buffer creation in ido’s switch buffer routine. Setting it to never is an exceptionally bad idea as creating buffers on-the-fly is a very useful thing to do if you want a quick throw-away buffer.

You can also rid yourself of the splash screen and the echo area message:

And finally, the recently-added prompt in Emacs 23.2 that asks you if you want to kill a buffer with a live process attached to it:

8 Comments
  1. h3rd3r permalink

    How to remove a confirmation question with ‘M-x revert-buffer’ ?

  2. Paul permalink

    Inhibiting the echo area message like that just leaves some other emacs initialization message in the echo area. To completely get rid of it or display a custom message fset the startup-echo-area-message function to one returning your own message string.

  3. sinners permalink

    kill-buffer-query-functions is a variable,value is nil ,then the last (remq ‘process-kill-buffer-query-function
    kill-buffer-query-functions) no effect

    • mickey permalink

      Then something in your .emacs file is already changing it, or you are using an older version(?) of Emacs.

      • sinners permalink

        my emacs is 24.2,after this setting,kill-buffer-query-function value is (server-kill-bufer-query-function)

  4. David permalink

    I too, dislike startup messages.
    I am having trouble disabling the following startup message:
    “for information about GNU emacs and the GNU system
    type C-h C-a”
    I have tried all of the above and a few other things.
    Any ideas?
    Thanks

    • David permalink

      I got it.
      I was able to find the answer by typing C-h C-a
      (eval-after-load “startup” ‘(fset ‘display-startup-echo-area-message (lambda ())))
      this along with the above did it for me.

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS