From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reuben Thomas Newsgroups: gmane.emacs.bugs Subject: bug#9323: Non-recursive make build systems and M-x compile Date: Fri, 19 Aug 2011 20:55:55 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1313783825 11256 80.91.229.12 (19 Aug 2011 19:57:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 19 Aug 2011 19:57:05 +0000 (UTC) Cc: 9323@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 19 21:57:01 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QuVBc-00065Q-VE for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Aug 2011 21:57:01 +0200 Original-Received: from localhost ([::1]:48337 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QuVBc-0001Sc-In for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Aug 2011 15:57:00 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:36863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QuVBa-0001RS-6R for bug-gnu-emacs@gnu.org; Fri, 19 Aug 2011 15:56:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QuVBY-0003F9-Qm for bug-gnu-emacs@gnu.org; Fri, 19 Aug 2011 15:56:58 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39447) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QuVBY-0003Ez-PB for bug-gnu-emacs@gnu.org; Fri, 19 Aug 2011 15:56:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QuVDa-0006st-EM; Fri, 19 Aug 2011 15:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Reuben Thomas Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Aug 2011 19:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9323 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9323-submit@debbugs.gnu.org id=B9323.131378388626395 (code B ref 9323); Fri, 19 Aug 2011 19:59:02 +0000 Original-Received: (at 9323) by debbugs.gnu.org; 19 Aug 2011 19:58:06 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QuVCf-0006rf-EF for submit@debbugs.gnu.org; Fri, 19 Aug 2011 15:58:05 -0400 Original-Received: from exprod7og104.obsmtp.com ([64.18.2.161]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1QuVCd-0006rX-4a for 9323@debbugs.gnu.org; Fri, 19 Aug 2011 15:58:04 -0400 Original-Received: from mail-pz0-f41.google.com ([209.85.210.41]) (using TLSv1) by exprod7ob104.postini.com ([64.18.6.12]) with SMTP ID DSNKTk6/y//N16rWpw0DzQhWy1wAPnROrKB7@postini.com; Fri, 19 Aug 2011 12:55:56 PDT Original-Received: by pzk4 with SMTP id 4so7516651pzk.28 for <9323@debbugs.gnu.org>; Fri, 19 Aug 2011 12:55:55 -0700 (PDT) Original-Received: by 10.142.216.20 with SMTP id o20mr50241wfg.446.1313783755033; Fri, 19 Aug 2011 12:55:55 -0700 (PDT) Original-Received: by 10.143.99.9 with HTTP; Fri, 19 Aug 2011 12:55:55 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 19 Aug 2011 15:59:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:50165 Archived-At: On 19 August 2011 20:46, Andreas Schwab wrote: > Reuben Thomas writes: > >> On 19 August 2011 14:41, Andreas Schwab wrote: >>> Reuben Thomas writes: >>> >>>> That's great, but it's not documented for users (it's mentioned in >>>> comments in lisp.el). How about adding something to compile's >>>> docstring along the lines of: >>>> >>>> To launch a compilation in a directory other than that of the buffer, >>>> prefix the compilation command with `cd ..;' or similar; compile will >>>> parse this to set the default directory of the compile buffer. >>> >>> ??? That's exactly what "make -C ..." accomplishes. >> >> That's right, but compile.el does not parse the directory out of a >> "make -C .." command, > > Yes, it does. =A0The directory is displayed by the entering > message. I'm sorry things are still unclear. I will now demonstrate step by step exactly the difference I am talking about: Running a recent build of emacs master branch from bazaar (emacs -Q): I visit ~/Software/zile-stable/src/main.c I do M-x compile I edit the command so that it reads: make -C .. -k and then run it. At the top of the compile buffer the following is shown: -*- mode: compilation; default-directory: "~/Software/zile-stable/src/" -*- Note that it has set default-directory to the directory of main.c, not its parent. Later, there is a warning: src/astr.c:67:12: warning: assignment discards qualifiers from pointer target type If I press enter over this warning, Emacs cannot open the target file, and prompts me with: Find this error in (default src/astr.c): ... Now I make clean (in a terminal) and try again, M-x compile, and this time I edit the command to: cd ..; make -k Now the compile buffer's first line reads: -*- mode: compilation; default-directory: "~/Software/zile-stable/" -*- Note that default-directory has been correctly set. The same warning as above is displayed in the buffer, and if I hit Enter over it, Emacs visits the file referred to without a prompt. Note that in compile.el there is no mention of make's -C option, whereas there are a couple of mentions of parsing out cd commands at the start of the compile command. --=20 http://rrt.sc3d.org