From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.bugs Subject: Re: kill-compilation failing when there are several compilation buffers Date: Wed, 01 Aug 2007 01:38:39 -0400 Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1185946592 20675 80.91.229.12 (1 Aug 2007 05:36:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 1 Aug 2007 05:36:32 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: eddy@opera.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 01 07:36:25 2007 Return-path: Envelope-to: geb-bug-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 1IG6sj-0000aD-2r for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Aug 2007 07:36:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IG6si-0006vs-5F for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Aug 2007 01:36:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IG6sg-0006vC-I4 for bug-gnu-emacs@gnu.org; Wed, 01 Aug 2007 01:36:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IG6sf-0006ts-Ns for bug-gnu-emacs@gnu.org; Wed, 01 Aug 2007 01:36:22 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IG6sf-0006tl-MW for bug-gnu-emacs@gnu.org; Wed, 01 Aug 2007 01:36:21 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IG6sf-0001iY-EQ for bug-gnu-emacs@gnu.org; Wed, 01 Aug 2007 01:36:21 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1IG6ut-0005MU-52; Wed, 01 Aug 2007 01:38:39 -0400 In-reply-to: (message from Edward Welbourne on Tue, 31 Jul 2007 20:25:15 +0200) X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16260 Archived-At: Reading the help C-h C-k got me on C-c C-k, I see it's (kill-compilation) which takes no parameter to indicate which compilation to kill, if there happen to be several. I had been under the impression that C-c C-k killed the current buffer's compilation previously, but the documentation doesn't say anything relating to that. C-c C-k ought to kill the current buffer's compilation if you are in a compilation buffer. If that doesn't reliably work, but is a bug. Does this patch fix it? Index: compile.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/progmodes/compile.el,v retrieving revision 1.421.2.5 diff -c -c -r1.421.2.5 compile.el *** compile.el 25 Jul 2007 04:29:36 -0000 1.421.2.5 --- compile.el 1 Aug 2007 05:32:34 -0000 *************** *** 1604,1615 **** (setq compilation-current-error (point)) (next-error-internal))) - ;; Return a compilation buffer. - ;; If the current buffer is a compilation buffer, return it. - ;; Otherwise, look for a compilation buffer and signal an error - ;; if there are none. (defun compilation-find-buffer (&optional avoid-current) ! (next-error-find-buffer avoid-current 'compilation-buffer-internal-p)) ;;;###autoload (defun compilation-next-error-function (n &optional reset) --- 1609,1624 ---- (setq compilation-current-error (point)) (next-error-internal))) (defun compilation-find-buffer (&optional avoid-current) ! "Return a compilation buffer. ! If AVOID-CURRENT is nil, and ! the current buffer is a compilation buffer, return it. ! If AVOID-CURRENT is non-nil, return the current buffer ! only as a last resort." ! (if (and (compilation-buffer-internal-p (current-buffer)) ! (not avoid-current)) ! (current-buffer) ! (next-error-find-buffer avoid-current 'compilation-buffer-internal-p))) ;;;###autoload (defun compilation-next-error-function (n &optional reset)