[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: kill-compilation failing when there are several compilation buffers
From: |
Edward Welbourne |
Subject: |
Re: kill-compilation failing when there are several compilation buffers |
Date: |
Tue, 07 Aug 2007 11:13:54 +0200 |
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 <quote>
and: Wrong number of arguments: #[nil "ÀÁ!" [local-variable-p
compilation-locs] 2 ("/usr/share/emacs/22.1/lisp/progmodes/compile.elc" .
48467)], 1
</quote> in *Messages* - which is puzzling, given that <quote src="*temp*">
(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)))
</quote> 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.