From: Edward Welbourne <eddy@opera.com>
To: rms@gnu.org
Cc: bug-gnu-emacs@gnu.org
Subject: Re: kill-compilation failing when there are several compilation buffers
Date: Tue, 07 Aug 2007 11:30:01 +0200 [thread overview]
Message-ID: <E1IILO5-0001iU-Bj@whorl> (raw)
In-Reply-To: <E1IG6ut-0005MU-52@fencepost.gnu.org> (message from Richard Stallman on Wed, 01 Aug 2007 01:38:39 -0400)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2128 bytes --]
ah !
I tried evaluating sub-expressions, albeit not in a compile-buffer.
When I evaluate
(compilation-buffer-internal-p (current-buffer))
I get thrown to the debugger: <quote src="*Backtrace*">
Debugger entered--Lisp error: (wrong-number-of-arguments #[nil "ÀÁ!" [local-variable-p compilation-locs] 2 ("/usr/share/emacs/22.1/lisp/progmodes/compile.elc" . 48467)] 1)
compilation-buffer-internal-p(#<buffer *temp*>)
eval((compilation-buffer-internal-p (current-buffer)))
eval-last-sexp-1(nil)
eval-last-sexp(nil)
call-interactively(eval-last-sexp)
</quote> so the problem's there. C-h f says <quote>
compilation-buffer-internal-p is a compiled Lisp function in `compile.el'.
(compilation-buffer-internal-p)
Test if inside a compilation buffer.
</quote> and /usr/share/emacs/22.1/lisp/progmodes/compile.el.gz
(helpfully uncompressed on the fly by emacs) says: <quote>
;;; test if a buffer is a compilation buffer, assuming we're in the buffer
(defsubst compilation-buffer-internal-p ()
"Test if inside a compilation buffer."
(local-variable-p 'compilation-locs))
;;; test if a buffer is a compilation buffer, using compilation-buffer-internal-p
(defsubst compilation-buffer-p (buffer)
"Test if BUFFER is a compilation buffer."
(with-current-buffer buffer
(compilation-buffer-internal-p)))
</quote> so it looks like a typo in your patch - it should either call
compilation-buffer-p or omit the (current-buffer) parameter to
compilation-buffer-internal-p. (I should also note that the error
message produced, claiming and got the wrong number of arguments, was
was not so helpful !)
Changing the defun to <quote>
(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)
(not avoid-current))
(current-buffer)
(next-error-find-buffer avoid-current 'compilation-buffer-internal-p)))
</quote> and doing C-c C-e to that fixes the bug :-)
Eddy.
next prev parent reply other threads:[~2007-08-07 9:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-31 18:25 kill-compilation failing when there are several compilation buffers Edward Welbourne
2007-08-01 5:38 ` Richard Stallman
2007-08-01 7:44 ` Edward Welbourne
2007-08-07 9:13 ` Edward Welbourne
2007-08-07 9:30 ` Edward Welbourne [this message]
2007-08-07 20:12 ` Richard Stallman
[not found] ` <mailman.4188.1185946583.32220.bug-gnu-emacs@gnu.org>
[not found] ` <jwvodhr2kc7.fsf-monnier+gnu.emacs.bug@gnu.org>
2007-08-01 19:43 ` Juri Linkov
2007-08-02 15:36 ` Stefan Monnier
2007-08-02 16:17 ` next-error-find-buffer (was: kill-compilation failing when there are several compilation buffers) Stefan Monnier
2007-08-02 20:45 ` next-error-find-buffer Ted Zlatanov
2007-08-03 3:38 ` next-error-find-buffer (was: kill-compilation failing when there are several compilation buffers) Richard Stallman
2007-08-03 18:19 ` next-error-find-buffer Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1IILO5-0001iU-Bj@whorl \
--to=eddy@opera.com \
--cc=bug-gnu-emacs@gnu.org \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.