From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.help Subject: Re: Disabling save-all-buffers on M-x compile Date: Sat, 06 Feb 2010 02:20:24 +0100 Message-ID: <871vgztb1j.fsf@telefonica.net> References: <5e3a506e1002051329r1396d87wee16de97036fa18d@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1265419345 12055 80.91.229.12 (6 Feb 2010 01:22:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Feb 2010 01:22:25 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Feb 06 02:22:09 2010 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.69) (envelope-from ) id 1NdZNA-00061o-P0 for geh-help-gnu-emacs@m.gmane.org; Sat, 06 Feb 2010 02:22:09 +0100 Original-Received: from localhost ([127.0.0.1]:60661 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NdZNA-0000Lg-6J for geh-help-gnu-emacs@m.gmane.org; Fri, 05 Feb 2010 20:22:08 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NdZM3-0000Cp-3b for help-gnu-emacs@gnu.org; Fri, 05 Feb 2010 20:20:59 -0500 Original-Received: from [199.232.76.173] (port=53808 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NdZM2-0000Cb-AV for help-gnu-emacs@gnu.org; Fri, 05 Feb 2010 20:20:58 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NdZM0-0007mu-Gm for help-gnu-emacs@gnu.org; Fri, 05 Feb 2010 20:20:57 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:35965) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NdZM0-0007mc-4D for help-gnu-emacs@gnu.org; Fri, 05 Feb 2010 20:20:56 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1NdZLv-0005QV-S3 for help-gnu-emacs@gnu.org; Sat, 06 Feb 2010 02:20:51 +0100 Original-Received: from 206.red-81-33-105.dynamicip.rima-tde.net ([81.33.105.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 06 Feb 2010 02:20:51 +0100 Original-Received: from ofv by 206.red-81-33-105.dynamicip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 06 Feb 2010 02:20:51 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 25 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 206.red-81-33-105.dynamicip.rima-tde.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (gnu/linux) Cancel-Lock: sha1:rr+wx5ZUFqT+C01VXQ6GThB6oCU= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:71706 Archived-At: Nathaniel Flath writes: > When I do M-x compile, emacs prompts me about all unsaved files I have > opened and whether I wish to save them. Is there a way to disable > this so it goes straight to compilation? There is the variable `compilation-ask-about-save'. If it is `nil', it saves without prompting, but maybe this is not what you want. Your other option is to define a `compile' replacement that does not call `save-some-buffers': (defun my-compile (command &optional comint) (interactive (list (let ((command (eval compile-command))) (if (or compilation-read-command current-prefix-arg) (compilation-read-command command) command)) (consp current-prefix-arg))) (unless (equal command (eval compile-command)) (setq compile-command command)) ;; (save-some-buffers (not compilation-ask-about-save) nil) (setq-default compilation-directory default-directory) (compilation-start command comint))