From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: compilation-process-setup-function doc bug? Date: Wed, 04 Nov 2009 21:44:44 -0500 Message-ID: References: <4AF206D9.1040406@pajato.com> <4AF235EA.6090405@pajato.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1257389106 17755 80.91.229.12 (5 Nov 2009 02:45:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Nov 2009 02:45:06 +0000 (UTC) Cc: emacs-devel@gnu.org To: Paul Michael Reilly Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 05 03:44:59 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N5sLI-0003V5-PZ for ged-emacs-devel@m.gmane.org; Thu, 05 Nov 2009 03:44:57 +0100 Original-Received: from localhost ([127.0.0.1]:41228 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N5sLI-00010z-2w for ged-emacs-devel@m.gmane.org; Wed, 04 Nov 2009 21:44:56 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N5sLC-00010m-Sx for emacs-devel@gnu.org; Wed, 04 Nov 2009 21:44:50 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N5sL8-00010C-HK for emacs-devel@gnu.org; Wed, 04 Nov 2009 21:44:50 -0500 Original-Received: from [199.232.76.173] (port=57956 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N5sL8-000109-9e for emacs-devel@gnu.org; Wed, 04 Nov 2009 21:44:46 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:15114 helo=ironport2-out.pppoe.ca) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N5sL7-0003RH-Vr for emacs-devel@gnu.org; Wed, 04 Nov 2009 21:44:46 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkIFAL7K8UpMCqIP/2dsb2JhbACBTtxThD0Egm6GCQ X-IronPort-AV: E=Sophos;i="4.44,683,1249272000"; d="scan'208";a="48721671" Original-Received: from 76-10-162-15.dsl.teksavvy.com (HELO pastel.home) ([76.10.162.15]) by ironport2-out.pppoe.ca with ESMTP; 04 Nov 2009 21:44:44 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 218C99941; Wed, 4 Nov 2009 21:44:44 -0500 (EST) In-Reply-To: <4AF235EA.6090405@pajato.com> (Paul Michael Reilly's message of "Wed, 04 Nov 2009 21:18:18 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:116654 Archived-At: >> Indeed, it appears the doc disagrees with the code. >> I'm not sure when the problem appeared, but the `compilation-buffer' is >> (current-buffer). OTOH compilation-window is not >> immediately available. (get-buffer-window (curent-buffer) 0) will >> usually return the right window, tho. > In that case I'd be happy to fix the code by making both variables buffer > local to the compilation buffer thus making the documentation consistent. > Unless you would prefer to have the last sentence removed from the > description and leave it to the User to figure out how to get the buffer or > window should they need it. My preference is the former. Since this behavior has been present since at least Emacs-22, I'd just remove the sentence from the docstring: (current-buffer) is a very good way to pass a buffer argument. As for the window, if we really want to pass it, then we should just select it during that call, but I don't think it's worth the trouble. Stefan