[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: |
Sam Steingold |
Subject: |
Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate): |
Date: |
Sun, 11 Apr 2010 15:21:50 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> * Stefan Monnier <address@hidden> [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!
- 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 <=
- 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, 2010/04/12
- 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