Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6166329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:19:13+00:00 2026-05-23T22:19:13+00:00

Whenever I try to quit Emacs it will ask me if I want to

  • 0

Whenever I try to quit Emacs it will ask me if I want to save any modified buffers. In the case where I answer “no” it will ask me:

Modified buffers exist; exit anyway? (y or n)

Is there any way to prevent Emacs from asking me the last question?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T22:19:13+00:00Added an answer on May 23, 2026 at 10:19 pm

    There are a number of ways you can do this:

    You could advise the save-buffers-kill-emacs function:

    (defadvice save-buffers-kill-emacs (around no-y-or-n activate)
      (flet ((yes-or-no-p (&rest args) t)
             (y-or-n-p (&rest args) t))
        ad-do-it))
    

    The downside of doing this is that it will also bypass the check for active processes in Emacs (which is done after the file buffer check). So, it is probably safest to write your own version of save-buffers-kill-emacs

    (defun my-save-buffers-kill-emacs (&optional arg)
      "Offer to save each buffer(once only), then kill this Emacs process.
    With prefix ARG, silently save all file-visiting buffers, then kill."
      (interactive "P")
      (save-some-buffers arg t)
      (and (or (not (fboundp 'process-list))
           ;; process-list is not defined on MSDOS.
           (let ((processes (process-list))
             active)
             (while processes
               (and (memq (process-status (car processes)) '(run stop open listen))
                (process-query-on-exit-flag (car processes))
                (setq active t))
               (setq processes (cdr processes)))
             (or (not active)
             (progn (list-processes t)
                (yes-or-no-p "Active processes exist; kill them and exit anyway? ")))))
           ;; Query the user for other things, perhaps.
           (run-hook-with-args-until-failure 'kill-emacs-query-functions)
           (or (null confirm-kill-emacs)
           (funcall confirm-kill-emacs "Really exit Emacs? "))
           (kill-emacs)))
    

    and either bind it to the standard C-x C-c key binding:

    (global-set-key (kbd "C-x C-c") 'my-save-buffers-kill-emacs)
    

    or fset it to “save-buffers-kill-emacs”:

    (fset 'save-buffers-kill-emacs 'my-save-buffers-kill-emacs)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to ask, which method has been called whenever the user quit
Whenever I try to write graphical programs (whether a game or really any GUI
Whenever I try to quit an application using AppleScript I get the following error
Whenever I try and make any Twitter request, my application always hangs. This does
Whenever I try installing anything using gem, I get this error - murtaza@murtaza-dev:~$ sudo
Whenever I try to edit existing or create new distribution provisioning profile on iOS
Whenever I try to use ranges in D, I fail miserably. What is the
Whenever I try to extend the Object prototype, I get an error: Error #1056:
Whenever I try to use apt-get/dpkg, it tries a to install a broken source.
Whenever i try to run sqlmetal, i get this: 'sqlmetal' is not recognized as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.