From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Misc. minor compile.el issues Date: 08 Dec 2002 02:38:55 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <5xn0nh8f2o.fsf@kfs2.cua.dk> References: <5xn0nkasst.fsf@kfs2.cua.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1039308139 12937 80.91.224.249 (8 Dec 2002 00:42:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 8 Dec 2002 00:42:19 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18KpWU-0003MX-00 for ; Sun, 08 Dec 2002 01:42:18 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18Kpfp-0000iz-00 for ; Sun, 08 Dec 2002 01:51:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18KpU9-0003p0-0B for emacs-devel@quimby.gnus.org; Sat, 07 Dec 2002 19:39:53 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18KpTp-0003f1-00 for emacs-devel@gnu.org; Sat, 07 Dec 2002 19:39:33 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18KpTg-0003Gt-00 for emacs-devel@gnu.org; Sat, 07 Dec 2002 19:39:28 -0500 Original-Received: from mail.filanet.dk ([195.215.206.179]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18KpTf-000319-00; Sat, 07 Dec 2002 19:39:24 -0500 Original-Received: from kfs2.cua.dk.cua.dk (unknown [10.1.82.3]) by mail.filanet.dk (Postfix) with SMTP id 2F1247C012; Sun, 8 Dec 2002 00:39:12 +0000 (GMT) Original-To: rms@gnu.org In-Reply-To: Original-Lines: 73 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:9968 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:9968 Richard Stallman writes: > The doc string for compilation-process-setup-function starts with a > `*' identifying it as a user option. Does that really make sense? > > That depends on where we draw the line about what is a user option. > The line as currently drawn includes many similar variables. For > instance, 76 normal hooks are marked as user options, although the > usual place for them to be set is certainly in Lisp code. I guess there are some hooks which are typically set by users (like the various ...-mode-hook variables), while other hook variables (like the above ...-setup-function) rarely has any meaning as a user option. > Perhaps we should move the line and none of these should be user > options. The mode hook variables should be user options, the rest probably should not. But I'll leave that decision to you :-) > > Related to this, I would like the setup function to be able to > access the buffer and/or window for the compilation process (e.g. > to set buffer-local variables). > > Can we make them current while the hook runs? Stefan pointed out that the buffer is already current when the hook is called ... so that's ok. > > As a final issue, I think that although the documentation for > compilation-process-setup-function says it is run just before the > process is started, it makes more sense to swap the following two > forms, to allow the setup function to control the > compilation-window-height: > > (compilation-set-window-height outwin) > (if compilation-process-setup-function > (funcall compilation-process-setup-function)) > > Isn't it easier to do that with the current order? Currently, > compilation-process-setup-function could enlarge the window. > If it is called first, what would it do to alter the height? > Locally set compilation-window-height, perhaps? > The problem is that compilation-set-window-height is also called elsewhere, and in its current form does NOT look at the buffer-local value of compilation-window-height in the compilation buffer if it is not the current buffer. [I've fixed that, but not committed the change yet]. And as I pointed out above, the setup-function does not have access to the compilation window, only the compilation buffer (the current buffer). For my purpose, the setup function does not need access to the window if it is called before compilation-set-window-height (which _is_ called with the compilation window as argument). So although it's a waste to first set the window height, and then call the setup hook which sets it again, it isn't actually possible with the current code! IMHO, it makes more sense to let the hook set compilation-window-height before compilation-set-window-height is called. And as I said, there really isn't any practical reason why we should not change the order [i.e. doing so will not break any existing code]. -- Kim F. Storm http://www.cua.dk