all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate): New custom variable.
       [not found] <E1NzYsW-0004b6-Iu@internal.in.savannah.gnu.org>
@ 2010-04-07 19:00 ` Stefan Monnier
  2010-04-07 20:40   ` Sam Steingold
  0 siblings, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2010-04-07 19:00 UTC (permalink / raw)
  To: Sam Steingold; +Cc: emacs-devel

>  ;;;###autoload
> +(defcustom compilation-save-buffers-predicate nil
> +  "The second argument (PRED) passed to `save-some-buffers' before compiling.
> +E.g., one can set this to
> +  (lambda ()
> +    (string-prefix-p my-compilation-root (file-truename (buffer-file-name))))
> +to limit saving to files located under `my-compilation-root'.
> +Note, that, in general, `compilation-directory' cannot be used instead
> +of `my-compilation-root' here."
> +  :type '(choice
> +          (const :tag "Default (save all file-visiting buffers)" nil)
> +          (const :tag "Save all buffers" t)
> +          function)
> +  :group 'compilation)
> +
> +;;;###autoload

- Please don't autoload defcustoms unless you have a *really* good
  reason to do it (and even then, ask permission first).
- I like where this is going, but I'm not sure this is enough.
  Could you explain how you see it being used?
  Could you also explain why `compilation-directory' can't be
  used instead?


-- Stefan




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate): New custom variable.
  2010-04-07 19:00 ` [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate): New custom variable Stefan Monnier
@ 2010-04-07 20:40   ` Sam Steingold
  2010-04-09  3:13     ` [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate): Stefan Monnier
  0 siblings, 1 reply; 12+ messages in thread
From: Sam Steingold @ 2010-04-07 20:40 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On 4/7/10, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> >  ;;;###autoload
>  > +(defcustom compilation-save-buffers-predicate nil
>  > +  "The second argument (PRED) passed to `save-some-buffers' before compiling.
>  > +E.g., one can set this to
>  > +  (lambda ()
>  > +    (string-prefix-p my-compilation-root (file-truename (buffer-file-name))))
>  > +to limit saving to files located under `my-compilation-root'.
>  > +Note, that, in general, `compilation-directory' cannot be used instead
>  > +of `my-compilation-root' here."
>  > +  :type '(choice
>  > +          (const :tag "Default (save all file-visiting buffers)" nil)
>  > +          (const :tag "Save all buffers" t)
>  > +          function)
>  > +  :group 'compilation)
>  > +
>  > +;;;###autoload
>
>  - Please don't autoload defcustoms unless you have a *really* good
>   reason to do it (and even then, ask permission first).

I autoloaded this one because its sibling compilation-ask-about-save
is autoloaded.

>  - I like where this is going, but I'm not sure this is enough.
>   Could you explain how you see it being used?

if you edit a huge file which is expensive to save, you do not want it
to be saved
whenever you start a compilation elsewhere.

>   Could you also explain why `compilation-directory' can't be
>   used instead?

because if you are working on a project foo and compile in directory foo/src,
you do want to save buffers editing foo/headers/baz.h,
but it is not under compilation-directory, which is foo/src/.

-- 
Sam Steingold <http://sds.podval.org>




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate):
  2010-04-07 20:40   ` Sam Steingold
@ 2010-04-09  3:13     ` Stefan Monnier
  2010-04-09 16:18       ` Sam Steingold
  0 siblings, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2010-04-09  3:13 UTC (permalink / raw)
  To: Sam Steingold; +Cc: emacs-devel

>> - Please don't autoload defcustoms unless you have a *really* good
>> reason to do it (and even then, ask permission first).
> I autoloaded this one because its sibling compilation-ask-about-save
> is autoloaded.

Thanks.  So we can remove this ;;;###autoload (sadly, removing it from
the other variable is not so easy because we first need to check
whether some code somewhere relies on it being autoloaded: that's one of
the reason why we don't want to autoload vars, since once it's done,
it's difficult to go back).

>> - I like where this is going, but I'm not sure this is enough.
>> Could you explain how you see it being used?
> if you edit a huge file which is expensive to save, you do not want it
> to be saved whenever you start a compilation elsewhere.

;-) that part I understand of course.
But I mean what value do you expect users to use it with?
Would they globally set it to save one particular directory of theirs?
What if they have more than one project?
Part of the question is because Customize doesn't know how to set/handle
defcustoms other than globally.

>> Could you also explain why `compilation-directory' can't be
>> used instead?
> because if you are working on a project foo and compile in directory foo/src,
> you do want to save buffers editing foo/headers/baz.h,
> but it is not under compilation-directory, which is foo/src/.

Can you imagine a way to make it "work automatically", maybe assuming
some particular convention that's followed half-often or that would be
easy to adjust to?


        Stefan




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate):
  2010-04-09  3:13     ` [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate): Stefan Monnier
@ 2010-04-09 16:18       ` Sam Steingold
  2010-04-10  1:04         ` Stefan Monnier
  0 siblings, 1 reply; 12+ messages in thread
From: Sam Steingold @ 2010-04-09 16:18 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier wrote:
>>> - Please don't autoload defcustoms unless you have a *really* good
>>> reason to do it (and even then, ask permission first).
>> I autoloaded this one because its sibling compilation-ask-about-save
>> is autoloaded.
> 
> Thanks.  So we can remove this ;;;###autoload

done.

>>> - I like where this is going, but I'm not sure this is enough.
>>> Could you explain how you see it being used?
>> if you edit a huge file which is expensive to save, you do not want it
>> to be saved whenever you start a compilation elsewhere.
> 
> ;-) that part I understand of course.
> But I mean what value do you expect users to use it with?
> Would they globally set it to save one particular directory of theirs?
> What if they have more than one project?

this is problematic because compile does not announce what it's working 
directory is.
I can add a variable compile-default-directory which will be nil globally and 
bound to default-directory in compile and recompile; then the users will be 
able to set compilation-save-buffers-predicate to
(lambda ()
  (string-prefix-p
    (locate-dominating-file compile-default-directory "foo")
    (file-truename (buffer-file-name))))
so that only files located in the currently compiled project are saved.
here "foo" should identify the project root, it can be, e.g., "configure" or 
"COPYING" or "README" or "OMakeroot" or "ANNOUNCE".
we can also use "bzr root"/"hg root" instead of locate-dominating-file.
this, however, becomes more and more expensive.

> Part of the question is because Customize doesn't know how to set/handle
> defcustoms other than globally.

I think the above setting would be fine globally.
Note that the "foo" above is very project-dependent and should be tweaked by 
the user to the flavor of one's projects.

>>> Could you also explain why `compilation-directory' can't be
>>> used instead?
>> because if you are working on a project foo and compile in directory foo/src,
>> you do want to save buffers editing foo/headers/baz.h,
>> but it is not under compilation-directory, which is foo/src/.
> 
> Can you imagine a way to make it "work automatically", maybe assuming
> some particular convention that's followed half-often or that would be
> easy to adjust to?

we can add compile-root-directory in addition to compile-default-directory to 
save on locate-dominating-file / "bzr root" calls.
the reasonable heuristics are:
1. if the compilation directory or the one right above it (for those who build 
in separate directories) is under a VC system which supports the "root" 
command, use that. this fails for multiple projects in the same tree - although 
not catastrophically (i.e., we might save extra files, but we are not likely to 
miss saving when it is necessary).
2. if the compile-command invokes "omake", then (locate-dominating-file 
compile-default-directory "OMakeroot") should be good.
3. locate-dominating-file on "configure", "ANNOUNCE" and "INSTALL" should be 
good, although "README" probably not.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate):
  2010-04-09 16:18       ` Sam Steingold
@ 2010-04-10  1:04         ` Stefan Monnier
  2010-04-11 19:21           ` Sam Steingold
  0 siblings, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2010-04-10  1:04 UTC (permalink / raw)
  To: Sam Steingold; +Cc: emacs-devel

>>>> - I like where this is going, but I'm not sure this is enough.
>>>> Could you explain how you see it being used?
>>> if you edit a huge file which is expensive to save, you do not want it
>>> to be saved whenever you start a compilation elsewhere.
>> ;-) that part I understand of course.
>> But I mean what value do you expect users to use it with?
>> Would they globally set it to save one particular directory of theirs?
>> What if they have more than one project?
> this is problematic because compile does not announce what it's working
> directory is.

Any reason why we can't fix that?

> I can add a variable compile-default-directory which will be nil globally
> and bound to default-directory in compile and recompile; then the users will
> be able to set compilation-save-buffers-predicate to
> (lambda ()
>  (string-prefix-p
>    (locate-dominating-file compile-default-directory "foo")
>    (file-truename (buffer-file-name))))
> so that only files located in the currently compiled project are saved.
> here "foo" should identify the project root, it can be, e.g., "configure" or
> "COPYING" or "README" or "OMakeroot" or "ANNOUNCE".
> we can also use "bzr root"/"hg root" instead of locate-dominating-file.
> this, however, becomes more and more expensive.

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).
- then we provide an option to "save only files in the current project".
- and we can also provide an option to "cd to project's root before
  running the command".
How does that sound?


        Stefan




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate):
  2010-04-10  1:04         ` Stefan Monnier
@ 2010-04-11 19:21           ` Sam Steingold
  2010-04-11 20:28             ` Stefan Monnier
  0 siblings, 1 reply; 12+ messages in thread
From: Sam Steingold @ 2010-04-11 19:21 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

> * Stefan Monnier <zbaavre@veb.hzbagerny.pn> [2010-04-09 21:04:37 -0400]:
>
>>>>> - I like where this is going, but I'm not sure this is enough.
>>>>> Could you explain how you see it being used?
>>>> if you edit a huge file which is expensive to save, you do not want it
>>>> to be saved whenever you start a compilation elsewhere.
>>> ;-) that part I understand of course.
>>> But I mean what value do you expect users to use it with?
>>> Would they globally set it to save one particular directory of theirs?
>>> What if they have more than one project?
>> this is problematic because compile does not announce what it's working
>> directory is.
>
> Any reason why we can't fix that?

no, and here is a solution:

>> I can add a variable compile-default-directory which will be nil globally
>> and bound to default-directory in compile and recompile; then the users will
>> be able to set compilation-save-buffers-predicate to
>> (lambda ()
>>  (string-prefix-p
>>    (locate-dominating-file compile-default-directory "foo")
>>    (file-truename (buffer-file-name))))
>> so that only files located in the currently compiled project are saved.
>> here "foo" should identify the project root, it can be, e.g., "configure" or
>> "COPYING" or "README" or "OMakeroot" or "ANNOUNCE".
>> we can also use "bzr root"/"hg root" instead of locate-dominating-file.
>> this, however, becomes more and more expensive.
>
> 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.

> - and we can also provide an option to "cd to project's root before
>   running the command".

I doubt the value of this.

> How does that sound?

fine.
gonna do it?

-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 9.10 (karmic)
http://mideasttruth.com http://honestreporting.com
http://jihadwatch.org http://dhimmi.com http://ffii.org http://pmw.org.il
I want Tamagochi! -- What for?  Your pet hamster is still alive!




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate):
  2010-04-11 19:21           ` Sam Steingold
@ 2010-04-11 20:28             ` Stefan Monnier
  2010-04-12 20:02               ` Sam Steingold
  2010-04-13 17:07               ` Tom Tromey
  0 siblings, 2 replies; 12+ messages in thread
From: Stefan Monnier @ 2010-04-11 20:28 UTC (permalink / raw)
  To: emacs-devel

>>>>> - I like where this is going, but I'm not sure this is enough.
>>>>> Could you explain how you see it being used?
>>>>> if you edit a huge file which is expensive to save, you do not want it
>>>>> to be saved whenever you start a compilation elsewhere.
>>>> ;-) that part I understand of course.
>>>> But I mean what value do you expect users to use it with?
>>>> Would they globally set it to save one particular directory of theirs?
>>>> What if they have more than one project?
>>> this is problematic because compile does not announce what it's working
>>> directory is.
>> Any reason why we can't fix that?
> no, and here is a solution:

I don't understand.  You're saying there's no reason why we can't fix it
and then you go ahead and point me to a workaround.  Maye we're not
talking about the same thing.  By "announce what it's working dir is"
I mean "make sure default-directory has the proper value".

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.

>> 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.

>> - 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.

>> How does that sound?
> fine.
> gonna do it?

;-)


        Stefan


PS: We're talking here mostly about designing a good default value for
your new variable, right?  Or if not default, at least a value that can
be listed in the possible options so the end user doesn't have to write
her own predicate function.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate):
  2010-04-11 20:28             ` Stefan Monnier
@ 2010-04-12 20:02               ` Sam Steingold
  2010-04-12 21:15                 ` Stefan Monnier
  2010-04-13 17:07               ` Tom Tromey
  1 sibling, 1 reply; 12+ messages in thread
From: Sam Steingold @ 2010-04-12 20:02 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier wrote:
>>>>>> - I like where this is going, but I'm not sure this is enough.
>>>>>> Could you explain how you see it being used?
>>>>>> if you edit a huge file which is expensive to save, you do not want it
>>>>>> to be saved whenever you start a compilation elsewhere.
>>>>> ;-) that part I understand of course.
>>>>> But I mean what value do you expect users to use it with?
>>>>> Would they globally set it to save one particular directory of theirs?
>>>>> What if they have more than one project?
>>>> this is problematic because compile does not announce what it's working
>>>> directory is.
>>> Any reason why we can't fix that?
>> no, and here is a solution:
> 
> I don't understand.  You're saying there's no reason why we can't fix it
> and then you go ahead and point me to a workaround.  Maye we're not
> talking about the same thing.  By "announce what it's working dir is"
> I mean "make sure default-directory has the proper value".
> 
> 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.

>>> 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).

>>> - 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

 >
 >>> How does that sound?
 >> fine.
 >> gonna do it?
 >
 > ;-)
 >
 >
 >         Stefan
 >
 >
 > PS: We're talking here mostly about designing a good default value for
 > your new variable, right?  Or if not default, at least a value that can
 > be listed in the possible options so the end user doesn't have to write
 > her own predicate function.
 >
 >
 >






^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate):
  2010-04-12 20:02               ` Sam Steingold
@ 2010-04-12 21:15                 ` Stefan Monnier
  2010-04-12 21:47                   ` Sam Steingold
  0 siblings, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2010-04-12 21:15 UTC (permalink / raw)
  To: Sam Steingold; +Cc: emacs-devel

>> 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




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate):
  2010-04-12 21:15                 ` Stefan Monnier
@ 2010-04-12 21:47                   ` Sam Steingold
  2010-04-13  0:04                     ` Stefan Monnier
  0 siblings, 1 reply; 12+ messages in thread
From: Sam Steingold @ 2010-04-12 21:47 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On 4/12/10, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> >> 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.

sorry about being unclear on this.

>  >>>> 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.

ok.

>  >>>> - 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.

actually, in my case, the build directory is different from the root,
so I think that bridge is already there.
note also that the build directory can easily be _not_ under root, but
somewhere far far away, on a separate partition.

-- 
Sam Steingold <http://sds.podval.org>




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate):
  2010-04-12 21:47                   ` Sam Steingold
@ 2010-04-13  0:04                     ` Stefan Monnier
  0 siblings, 0 replies; 12+ messages in thread
From: Stefan Monnier @ 2010-04-13  0:04 UTC (permalink / raw)
  To: Sam Steingold; +Cc: emacs-devel

> actually, in my case, the build directory is different from the root,
> so I think that bridge is already there.
> note also that the build directory can easily be _not_ under root, but
> somewhere far far away, on a separate partition.

Ah, yes, that case.  Indeed, I rarely if ever do that, but some people
use it very commonly, so it'd be good to support it as well.


        Stefan




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate):
  2010-04-11 20:28             ` Stefan Monnier
  2010-04-12 20:02               ` Sam Steingold
@ 2010-04-13 17:07               ` Tom Tromey
  1 sibling, 0 replies; 12+ messages in thread
From: Tom Tromey @ 2010-04-13 17:07 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

>>>>> "Stefan" == Stefan Monnier <monnier@iro.umontreal.ca> writes:

Stefan> I've used several build systems where this is necessary (e.g. a single
Stefan> Makefile at the root, or something equivalent).  I usually work around
Stefan> it with something like M-x compile RET cd ..; make RET, but if `compile'
Stefan> could insert the "cd .." for me when needed it would be even better.

For the specific case of using GNU make, I work around this problem
using

M-x compile make -C /full/path/to/build ...

This causes make to emit the info that Emacs needs to find the real
build directory.

Luckily for me I'm basically only using GNU make for builds, so I
haven't had to find tricks for other systems.

Tom




^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-04-13 17:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1NzYsW-0004b6-Iu@internal.in.savannah.gnu.org>
2010-04-07 19:00 ` [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate): New custom variable Stefan Monnier
2010-04-07 20:40   ` Sam Steingold
2010-04-09  3:13     ` [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate): Stefan Monnier
2010-04-09 16:18       ` Sam Steingold
2010-04-10  1:04         ` Stefan Monnier
2010-04-11 19:21           ` Sam Steingold
2010-04-11 20:28             ` Stefan Monnier
2010-04-12 20:02               ` Sam Steingold
2010-04-12 21:15                 ` Stefan Monnier
2010-04-12 21:47                   ` Sam Steingold
2010-04-13  0:04                     ` Stefan Monnier
2010-04-13 17:07               ` Tom Tromey

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.