From: Reuben Thomas <rrt@sc3d.org>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: 9323@debbugs.gnu.org
Subject: bug#9323: Non-recursive make build systems and M-x compile
Date: Fri, 19 Aug 2011 20:55:55 +0100 [thread overview]
Message-ID: <CAOnWdoj1UiPPcPR6DQ1ErNSrELbnyqzkWc2zdU+OKEGuqPC57Q@mail.gmail.com> (raw)
In-Reply-To: <m24o1db2vn.fsf@igel.home>
On 19 August 2011 20:46, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Reuben Thomas <rrt@sc3d.org> writes:
>
>> On 19 August 2011 14:41, Andreas Schwab <schwab@linux-m68k.org> wrote:
>>> Reuben Thomas <rrt@sc3d.org> 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. The 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.
--
http://rrt.sc3d.org
next prev parent reply other threads:[~2011-08-19 19:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-18 18:37 bug#9323: Non-recursive make build systems and M-x compile Reuben Thomas
2011-08-18 21:48 ` Andreas Schwab
2011-08-18 22:43 ` Reuben Thomas
2011-08-19 1:28 ` grischka
2011-08-19 3:23 ` Stefan Monnier
2011-08-19 12:17 ` Reuben Thomas
2011-08-19 13:41 ` Andreas Schwab
2011-08-19 17:22 ` Reuben Thomas
2011-08-19 19:46 ` Andreas Schwab
2011-08-19 19:55 ` Reuben Thomas [this message]
2011-08-19 23:30 ` Andreas Schwab
2011-08-20 5:20 ` Reuben Thomas
2011-08-20 12:57 ` Andreas Schwab
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=CAOnWdoj1UiPPcPR6DQ1ErNSrELbnyqzkWc2zdU+OKEGuqPC57Q@mail.gmail.com \
--to=rrt@sc3d.org \
--cc=9323@debbugs.gnu.org \
--cc=schwab@linux-m68k.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.