From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Edward Welbourne Newsgroups: gmane.emacs.bugs Subject: Re: kill-compilation failing when there are several compilation buffers Date: Tue, 07 Aug 2007 11:13:54 +0200 Message-ID: References: Reply-To: eddy@opera.com NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1186478139 6973 80.91.229.12 (7 Aug 2007 09:15:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 7 Aug 2007 09:15:39 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: rms@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 07 11:15:37 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 1IILA6-0002fH-Hs for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Aug 2007 11:15:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IILA3-000815-Pb for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Aug 2007 05:15:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IIL9v-00080i-F9 for bug-gnu-emacs@gnu.org; Tue, 07 Aug 2007 05:15:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IIL9o-00080D-Ib for bug-gnu-emacs@gnu.org; Tue, 07 Aug 2007 05:15:21 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IIL9n-000807-SP for bug-gnu-emacs@gnu.org; Tue, 07 Aug 2007 05:15:16 -0400 Original-Received: from sam.opera.com ([213.236.208.81]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IIL9U-0006IX-SN; Tue, 07 Aug 2007 05:14:58 -0400 Original-Received: from whorl (pat-tdc.opera.com [213.236.208.22]) by sam.opera.com (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id l779E592008365 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Tue, 7 Aug 2007 09:14:09 GMT Original-Received: from eddy by whorl with local (Exim 4.67) (envelope-from ) id 1IIL8U-0001Ur-8E; Tue, 07 Aug 2007 11:13:54 +0200 In-reply-to: (message from Richard Stallman on Wed, 01 Aug 2007 01:38:39 -0400) X-Virus-Scanned: ClamAV 0.90.1/3879/Tue Aug 7 00:27:49 2007 on sam.opera.com X-Virus-Status: Clean X-Detected-Kernel: Linux 2.4-2.6 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:16293 Archived-At: Hi again, > 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. OK, now successfully reproduced: I started two compiles in separate buffers, inadvertently using the same command in both (forgot to history-back one of them !) and the command I'd used was the right command for the buffer I started second, so I went to the one I'd started first, which was in fact *compilation*, and C-c C-k'd in it; but the later-started compilation got killed instead. So this *is* a bug. > Does this patch fix it? No. I put your replacement defun into a temp-buffer, removed its ! markers, C-c C-e'd it and set about re-testing in my handy pair of compile buffers. C-c C-k is now broken: I get and: Wrong number of arguments: #[nil "ÀÁ!‡" [local-variable-p compilation-locs] 2 ("/usr/share/emacs/22.1/lisp/progmodes/compile.elc" . 48467)], 1 in *Messages* - which is puzzling, given that (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))) the changed code quite plainly supplies (and CONDITIONS ...) with two arguments, compatible with what C-h f says about it. Then again, I don't understand anything the error message says after the second : gah - rmail wants to know what coding system to use, so I guess it's about to mangle that *Message* line. It currently says: and: Wrong number of arguments: #[nil "\300\301!\207" [local-variable-p compilation-locs] 2 ("/usr/share/emacs/22.1/lisp/progmodes/compile.elc" . 48467)], 1 except that the three escapes in "\300\301!\207" are actually single characters, not the escape sequence as which they display (in blue). Eddy.