From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: recompile uses wrong buffer.. hint Date: Mon, 07 Jun 2004 12:29:00 +0300 Organization: JURTA Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87lliz90o3.fsf@mail.jurta.org> References: <49418.217.194.34.123.1086597616.squirrel@wwws.franken.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1086601094 3367 80.91.224.253 (7 Jun 2004 09:38:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 7 Jun 2004 09:38:14 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Jun 07 11:38:07 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BXGZz-0007Cn-00 for ; Mon, 07 Jun 2004 11:38:07 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BXGZy-0001Qy-00 for ; Mon, 07 Jun 2004 11:38:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BXGaV-0000pp-Go for emacs-devel@quimby.gnus.org; Mon, 07 Jun 2004 05:38:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BXGaT-0000p8-9J for emacs-devel@gnu.org; Mon, 07 Jun 2004 05:38:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BXGaS-0000oa-I9 for emacs-devel@gnu.org; Mon, 07 Jun 2004 05:38:36 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BXGaS-0000oU-D6 for emacs-devel@gnu.org; Mon, 07 Jun 2004 05:38:36 -0400 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1BXGZu-0007q8-6i for emacs-devel@gnu.org; Mon, 07 Jun 2004 05:38:02 -0400 Original-Received: from [66.33.219.19] (helo=spoon.dreamhost.com) by mx20.gnu.org with esmtp (Exim 4.34) id 1BXGTd-0006Rm-Dy for emacs-devel@gnu.org; Mon, 07 Jun 2004 05:31:33 -0400 Original-Received: from mail.jurta.org (80-235-35-47-dsl.mus.estpak.ee [80.235.35.47]) by spoon.dreamhost.com (Postfix) with ESMTP id C2B1113D8AA; Mon, 7 Jun 2004 02:31:30 -0700 (PDT) Original-To: "Stephan Stahl" In-Reply-To: <49418.217.194.34.123.1086597616.squirrel@wwws.franken.de> (Stephan Stahl's message of "Mon, 7 Jun 2004 10:40:16 +0200 (CEST)") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:24654 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:24654 "Stephan Stahl" writes: > I tried to find a solution to this problem and at least found what was > causing this strange behaviour. > > The function `compilation-buffer-name' tries to get a name for the > compilation buffer. There is a test: > ((and (eq major-mode 'compilation-mode) > (equal mode-name (nth 2 compilation-arguments))) > (buffer-name)) > that equal will (always?) return nil because the structure of > compilation-arguments has changed in the recent compile.el rewrite. > Because of this the function will always return a default name. Maybe its > sufficient to remove that equal but i'm not sure.. Removing `equal' and thus leaving only `(eq major-mode 'compilation-mode)' doesn't work for grep mode. I think the right condition should be: ((eq major-mode (nth 1 compilation-arguments)) (buffer-name)) -- Juri Linkov http://www.jurta.org/emacs/