emacs-devel
[Top][All Lists]
Advanced

[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: Sun, 11 Apr 2010 16:28:26 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]