* Spurious buffer saving triggered by M-x compile
@ 2010-06-16 14:20 Geoff Gole
2010-06-16 15:39 ` Wojciech Meyer
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Geoff Gole @ 2010-06-16 14:20 UTC (permalink / raw)
To: Emacs development discussions
At the moment, M-x compile and friends will trigger the saving of
every file-backed buffer. When there are unsaved buffers unrelated to
the compilation, this becomes quite annoying.
What does everybody think about adding a way to exclude buffers from
this process? We could allow compilation-ask-about-save to be a
predicate function, or add a variable
compilation-save-buffer-predicate.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Spurious buffer saving triggered by M-x compile
2010-06-16 14:20 Spurious buffer saving triggered by M-x compile Geoff Gole
@ 2010-06-16 15:39 ` Wojciech Meyer
[not found] ` <AANLkTikyJ7lGiB9h3490vM7m2aET6co6DXOP_BeMGGbP@mail.gmail.com>
2010-06-16 21:07 ` Juri Linkov
2 siblings, 0 replies; 7+ messages in thread
From: Wojciech Meyer @ 2010-06-16 15:39 UTC (permalink / raw)
To: Geoff Gole; +Cc: Emacs development discussions
On Wed, Jun 16, 2010 at 3:20 PM, Geoff Gole <geoffgole@gmail.com> wrote:
> At the moment, M-x compile and friends will trigger the saving of
> every file-backed buffer. When there are unsaved buffers unrelated to
> the compilation, this becomes quite annoying.
>
> What does everybody think about adding a way to exclude buffers from
> this process? We could allow compilation-ask-about-save to be a
> predicate function, or add a variable
> compilation-save-buffer-predicate.
>
>
It is annoying for me too, although the source control take care about it..
How about asking for the first time, e.g no yes/no but yes/no/ add to
ignore for unsaved buffers?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Spurious buffer saving triggered by M-x compile
[not found] ` <AANLkTikyJ7lGiB9h3490vM7m2aET6co6DXOP_BeMGGbP@mail.gmail.com>
@ 2010-06-16 16:48 ` Geoff Gole
0 siblings, 0 replies; 7+ messages in thread
From: Geoff Gole @ 2010-06-16 16:48 UTC (permalink / raw)
To: René Kyllingstad, emacs-devel
> There has been talk about a project concept on this list before. One
> simple idea was to search up the directory tree to find a vc directory
> (.bzr, .git), or other filename known to exist in the root directory
> of a project.
>
> If there was a concept of a project, compilation-ask-about-save could
> presumably be told to only ask about files in a subdirectory of the
> current project.
That sounds like a good idea, but it would be nice to also handle the
case where there is no project.
(Was this reply supposed to be off-list? I'm dragging it back on-list
on the assumption it was not.)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Spurious buffer saving triggered by M-x compile
2010-06-16 14:20 Spurious buffer saving triggered by M-x compile Geoff Gole
2010-06-16 15:39 ` Wojciech Meyer
[not found] ` <AANLkTikyJ7lGiB9h3490vM7m2aET6co6DXOP_BeMGGbP@mail.gmail.com>
@ 2010-06-16 21:07 ` Juri Linkov
2010-06-16 21:50 ` Geoff Gole
2 siblings, 1 reply; 7+ messages in thread
From: Juri Linkov @ 2010-06-16 21:07 UTC (permalink / raw)
To: Geoff Gole; +Cc: Emacs development discussions
> At the moment, M-x compile and friends will trigger the saving of
> every file-backed buffer. When there are unsaved buffers unrelated to
> the compilation, this becomes quite annoying.
>
> What does everybody think about adding a way to exclude buffers from
> this process? We could allow compilation-ask-about-save to be a
> predicate function, or add a variable
> compilation-save-buffer-predicate.
`compilation-save-buffers-predicate' is already implemented in compile.el.
--
Juri Linkov
http://www.jurta.org/emacs/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Spurious buffer saving triggered by M-x compile
2010-06-16 21:07 ` Juri Linkov
@ 2010-06-16 21:50 ` Geoff Gole
2010-06-17 8:31 ` Juri Linkov
0 siblings, 1 reply; 7+ messages in thread
From: Geoff Gole @ 2010-06-16 21:50 UTC (permalink / raw)
To: Juri Linkov; +Cc: Emacs development discussions
>
> `compilation-save-buffers-predicate' is already implemented in compile.el.
>
I don't see it. My emacs must be too old.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Spurious buffer saving triggered by M-x compile
2010-06-16 21:50 ` Geoff Gole
@ 2010-06-17 8:31 ` Juri Linkov
2010-06-17 13:45 ` Geoff Gole
0 siblings, 1 reply; 7+ messages in thread
From: Juri Linkov @ 2010-06-17 8:31 UTC (permalink / raw)
To: Geoff Gole; +Cc: Emacs development discussions
>> `compilation-save-buffers-predicate' is already implemented in compile.el.
>
> I don't see it. My emacs must be too old.
(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
:version "24.1")
--
Juri Linkov
http://www.jurta.org/emacs/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Spurious buffer saving triggered by M-x compile
2010-06-17 8:31 ` Juri Linkov
@ 2010-06-17 13:45 ` Geoff Gole
0 siblings, 0 replies; 7+ messages in thread
From: Geoff Gole @ 2010-06-17 13:45 UTC (permalink / raw)
To: Juri Linkov; +Cc: Emacs development discussions
> :version "24.1"
Right, I'm not that up to date. Thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-06-17 13:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-16 14:20 Spurious buffer saving triggered by M-x compile Geoff Gole
2010-06-16 15:39 ` Wojciech Meyer
[not found] ` <AANLkTikyJ7lGiB9h3490vM7m2aET6co6DXOP_BeMGGbP@mail.gmail.com>
2010-06-16 16:48 ` Geoff Gole
2010-06-16 21:07 ` Juri Linkov
2010-06-16 21:50 ` Geoff Gole
2010-06-17 8:31 ` Juri Linkov
2010-06-17 13:45 ` Geoff Gole
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.