From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: compilation-ask-about-kill Date: Mon, 11 Jan 2010 23:57:23 +0200 Organization: JURTA Message-ID: <87r5pwv6no.fsf@mail.jurta.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1263247277 17083 80.91.229.12 (11 Jan 2010 22:01:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Jan 2010 22:01:17 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alexander Klimov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 11 23:01:10 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NUSJw-0005b2-H2 for ged-emacs-devel@m.gmane.org; Mon, 11 Jan 2010 23:01:08 +0100 Original-Received: from localhost ([127.0.0.1]:41933 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUSJx-0004hf-8g for ged-emacs-devel@m.gmane.org; Mon, 11 Jan 2010 17:01:09 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUSJr-0004hD-Jc for emacs-devel@gnu.org; Mon, 11 Jan 2010 17:01:03 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUSJm-0004ej-FM for emacs-devel@gnu.org; Mon, 11 Jan 2010 17:01:03 -0500 Original-Received: from [199.232.76.173] (port=35483 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUSJm-0004ed-7m for emacs-devel@gnu.org; Mon, 11 Jan 2010 17:00:58 -0500 Original-Received: from smtp-out3.starman.ee ([85.253.0.5]:56784 helo=mx1.starman.ee) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NUSJl-0000Wm-P7 for emacs-devel@gnu.org; Mon, 11 Jan 2010 17:00:57 -0500 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (82.131.94.221.cable.starman.ee [82.131.94.221]) by mx1.starman.ee (Postfix) with ESMTP id 58F853F4090; Tue, 12 Jan 2010 00:00:47 +0200 (EET) In-Reply-To: (Alexander Klimov's message of "Tue, 5 Jan 2010 16:46:07 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (x86_64-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:119834 Archived-At: > It would be nice to allow recompilation with a single key stroke even > if the previous compilation hangs. With the following patch the user > can skip > > `A ... process is running; kill it?' > > if he set `compilation-ask-about-kill' to nil. Instead of adding a new defcustom, it would be better to use the existing feature created for this purpose. As the docstring of `compilation-start-hook' suggests using the following code when you do not want a question about killing the compilation: (add-hook 'compilation-start-hook (lambda (process) (set-process-query-on-exit-flag process nil))) I think a query in `compilation-start' should respect this user setting, because when the user decides that the running process should be killed without quering, then it has no difference whether the process is killed by killing the process buffer with `C-x k'/`C-x C-c', or with running a new compilation: === modified file 'lisp/progmodes/compile.el' --- lisp/progmodes/compile.el 2010-01-09 21:14:50 +0000 +++ lisp/progmodes/compile.el 2010-01-11 21:56:48 +0000 @@ -1197,6 +1197,7 @@ (let ((comp-proc (get-buffer-process (current-buffer)))) (if comp-proc (if (or (not (eq (process-status comp-proc) 'run)) + (not (process-query-on-exit-flag comp-proc)) (yes-or-no-p (format "A %s process is running; kill it? " name-of-mode))) -- Juri Linkov http://www.jurta.org/emacs/