[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers
From: |
Stefan Monnier |
Subject: |
Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate): |
Date: |
Mon, 12 Apr 2010 17:15:40 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
>> Introducing `compile-default-directory' is not the end of the world, but
>> to my naive eyes, if `default-directory' doesn't point to the right
>> place, it's a bug to be fixed.
> default-directory "Automatically becomes buffer-local when set in any
> fashion" this means that it is useless in
> compilation-save-buffers-predicate because that is called inside the
> buffer to be saved and thus for it default-directory should be the
> directory where the buffer is located.
Ah, yes, that would be a good reason, sorry for being so dense.
>>>> How 'bout this:
>>>> - we provide some way for the user to explain to compile.el how to find
>>>> her projects's root directories (e.g. a list of tell-tale file names).
>>> this is tricky: some files might be ordinary for some projects and the
>>> tell-tale for others.
>> I know, that's a significant problem, but I can't think of a really good
>> solution other than push it onto the user by providing a customizable
>> variable. My main goal here is to make sure that we can support the
>> case where the user has several projects, which seems like a common
>> enough case, especially for Free Software hackers.
> I think this variable should be buffer-local (with an eye on being set in
> dir_locals).
Ah! Thanks for finally answering my original question "Could you
explain how you see it being used?" ;-)
My first answer would have been: in that case it probably shouldn't be
a defcustom. But by now, I think we *can* give it a good global default
value (and justify it being a defcustom).
This default value will depend on Emacs being able to figure out what is
"the current project", which is something where Emacs needs to improve
anyway, so it's a good direction.
>>>> - and we can also provide an option to "cd to project's root before
>>>> running the command".
>>> I doubt the value of this.
>> I've used several build systems where this is necessary (e.g. a single
>> Makefile at the root, or something equivalent). I usually work around
>> it with something like M-x compile RET cd ..; make RET, but if `compile'
>> could insert the "cd .." for me when needed it would be even better.
> this sounds like a case for yet another buffer-local variable -
> build-directory
Could be. In my case this build-dir has always been the same as the
project's root, but indeed there may be cases where something else
is needed. We'll cross that bridge when we get there.
Stefan
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate): New custom variable., Stefan Monnier, 2010/04/07
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate): New custom variable., Sam Steingold, 2010/04/07
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate):, Stefan Monnier, 2010/04/08
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate):, Sam Steingold, 2010/04/09
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate):, Stefan Monnier, 2010/04/09
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate):, Sam Steingold, 2010/04/11
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate):, Stefan Monnier, 2010/04/11
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate):, Sam Steingold, 2010/04/12
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate):,
Stefan Monnier <=
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate):, Sam Steingold, 2010/04/12
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate):, Stefan Monnier, 2010/04/12
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate):, Tom Tromey, 2010/04/13