unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Disabling save-all-buffers on M-x compile
@ 2010-02-05 21:29 Nathaniel Flath
  2010-02-06  1:20 ` Óscar Fuentes
       [not found] ` <mailman.782.1265419261.14305.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 3+ messages in thread
From: Nathaniel Flath @ 2010-02-05 21:29 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 212 bytes --]

Hello,

When I do M-x compile, emacs prompts me about all unsaved files I have
opened and whether I wish to save them.  Is there a way to disable this so
it goes straight to compilation?

Thanks,
Nathaniel Flath

[-- Attachment #2: Type: text/html, Size: 232 bytes --]

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

* Re: Disabling save-all-buffers on M-x compile
  2010-02-05 21:29 Disabling save-all-buffers on M-x compile Nathaniel Flath
@ 2010-02-06  1:20 ` Óscar Fuentes
       [not found] ` <mailman.782.1265419261.14305.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 3+ messages in thread
From: Óscar Fuentes @ 2010-02-06  1:20 UTC (permalink / raw)
  To: help-gnu-emacs

Nathaniel Flath <flat0103@gmail.com> writes:

> When I do M-x compile, emacs prompts me about all unsaved files I have
> opened and whether I wish to save them.  Is there a way to disable
> this so it goes straight to compilation?

There is the variable `compilation-ask-about-save'. If it is `nil', it
saves without prompting, but maybe this is not what you want.

Your other option is to define a `compile' replacement that does not
call `save-some-buffers':

(defun my-compile (command &optional comint)
  (interactive
   (list
    (let ((command (eval compile-command)))
      (if (or compilation-read-command current-prefix-arg)
	  (compilation-read-command command)
	command))
    (consp current-prefix-arg)))
  (unless (equal command (eval compile-command))
    (setq compile-command command))
  ;; (save-some-buffers (not compilation-ask-about-save) nil)
  (setq-default compilation-directory default-directory)
  (compilation-start command comint))





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

* Re: Disabling save-all-buffers on M-x compile
       [not found] ` <mailman.782.1265419261.14305.help-gnu-emacs@gnu.org>
@ 2010-02-06  3:38   ` despen
  0 siblings, 0 replies; 3+ messages in thread
From: despen @ 2010-02-06  3:38 UTC (permalink / raw)
  To: help-gnu-emacs

Óscar Fuentes <ofv@wanadoo.es> writes:

> Nathaniel Flath <flat0103@gmail.com> writes:
>
>> When I do M-x compile, emacs prompts me about all unsaved files I have
>> opened and whether I wish to save them.  Is there a way to disable
>> this so it goes straight to compilation?
>
> There is the variable `compilation-ask-about-save'. If it is `nil', it
> saves without prompting, but maybe this is not what you want.
>
> Your other option is to define a `compile' replacement that does not
> call `save-some-buffers':

Use M-x grep.
Just change the grep command as desired.

I really like the prompts as they are...


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

end of thread, other threads:[~2010-02-06  3:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-05 21:29 Disabling save-all-buffers on M-x compile Nathaniel Flath
2010-02-06  1:20 ` Óscar Fuentes
     [not found] ` <mailman.782.1265419261.14305.help-gnu-emacs@gnu.org>
2010-02-06  3:38   ` despen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).