From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Anselm Helbig Newsgroups: gmane.emacs.help Subject: Re: no questions when quitting Date: Thu, 07 May 2009 10:59:58 +0200 Organization: Freie Universitaet Berlin Message-ID: <87eiv1jnjl.wl%anselm.helbig+news2009@googlemail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1241689378 29992 80.91.229.12 (7 May 2009 09:42:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 May 2009 09:42:58 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 07 11:42:49 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M207r-0006qn-KI for geh-help-gnu-emacs@m.gmane.org; Thu, 07 May 2009 11:42:47 +0200 Original-Received: from localhost ([127.0.0.1]:33804 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M207r-00034V-5r for geh-help-gnu-emacs@m.gmane.org; Thu, 07 May 2009 05:42:47 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 36 Original-X-Trace: news.uni-berlin.de NuS6w2P+SN0UNvXIIxOFnwYgTaYoUEc+hbVwAe8wDxcmeDYJAKPC5qz01F Cancel-Lock: sha1:mYOIhfAhIDUg88Be5mJBB9EDE1o= In-Reply-To: Mail-Followup-To: anselm.helbig+news2009@googlemail.com User-Agent: SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.7 Emacs/22.3 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI) Original-Xref: news.stanford.edu gnu.emacs.help:168951 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:64219 Archived-At: Hi! > How can I force emacs to quit immediately after pressing C-x C-c > without asking any questions. > I would like all remaining modified buffers to be not saved and all > running emacs subprocesses to be killed. > > I read in info documentation that confirm-kill-emacs variable adjusts > this behaviour. > Unfortunately I don't know to which value I should set it to achieve > what I want since nil value leads me to yes-or-no-p function. `confirm-kill-emacs' does something different: you can have it ask for confirmation even if no buffers need saving. You can achieve this by binding C-x C-c to `kill-emacs' instead of `save-buffers-kill-emacs': (global-set-key (kbd "C-x C-c") 'kill-emacs) BTW, `save-buffers-kill-emacs' takes a prefix argument in which case it saves all pending changes automatically - which you said is not what you want. However, you might want to change the way you work: if you need a buffer with contents you don't want to save, just don't associate a file with it! Creating sucha buffer is easy, just give switch-buffer (C-x b) the name of a buffer that doesn't yet exist. You have to set the major mode you want manually, though. HTH, Anselm -- Anselm Helbig mailto:anselm.helbig+news2009@googlemail.com