unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Alexander Klimov <alserkli@inbox.ru>
Cc: emacs-devel@gnu.org
Subject: Re: compilation-ask-about-kill
Date: Mon, 11 Jan 2010 23:57:23 +0200	[thread overview]
Message-ID: <87r5pwv6no.fsf@mail.jurta.org> (raw)
In-Reply-To: <TheMailAgent.930c4ce113f7e4@bbce99704b02c6f1a64> (Alexander Klimov's message of "Tue, 5 Jan 2010 16:46:07 +0200")

> It would be nice to allow recompilation with a single key stroke even
> if the previous compilation hangs. With the following patch the user
> can skip
>
>  `A ... process is running; kill it?'
>
> if he set `compilation-ask-about-kill' to nil.

Instead of adding a new defcustom, it would be better to use the
existing feature created for this purpose.

As the docstring of `compilation-start-hook' suggests using
the following code when you do not want a question about killing
the compilation:

  (add-hook 'compilation-start-hook
            (lambda (process)
              (set-process-query-on-exit-flag process nil)))

I think a query in `compilation-start' should respect this user setting,
because when the user decides that the running process should be killed
without quering, then it has no difference whether the process is killed
by killing the process buffer with `C-x k'/`C-x C-c', or with running
a new compilation:

=== modified file 'lisp/progmodes/compile.el'
--- lisp/progmodes/compile.el	2010-01-09 21:14:50 +0000
+++ lisp/progmodes/compile.el	2010-01-11 21:56:48 +0000
@@ -1197,6 +1197,7 @@
       (let ((comp-proc (get-buffer-process (current-buffer))))
 	(if comp-proc
 	    (if (or (not (eq (process-status comp-proc) 'run))
+		    (not (process-query-on-exit-flag comp-proc))
 		    (yes-or-no-p
 		     (format "A %s process is running; kill it? "
 			     name-of-mode)))

-- 
Juri Linkov
http://www.jurta.org/emacs/




  parent reply	other threads:[~2010-01-11 21:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-05 14:46 compilation-ask-about-kill Alexander Klimov
2010-01-05 22:28 ` compilation-ask-about-kill Kevin Ryde
2010-01-06  7:36 ` compilation-ask-about-kill Alexander Klimov
2010-01-06 20:28 ` compilation-ask-about-kill Juri Linkov
2010-01-09  0:09   ` compilation-ask-about-kill Kevin Ryde
2010-01-09 17:54     ` compilation-ask-about-kill Juri Linkov
2010-01-09 18:10     ` compilation-ask-about-kill David Kastrup
2010-01-10 23:02       ` compilation-ask-about-kill Kevin Ryde
2010-01-11 21:57 ` Juri Linkov [this message]
2010-01-12 11:06   ` compilation-ask-about-kill Alexander Klimov
2010-01-13 22:01   ` compilation-ask-about-kill Kevin Ryde
  -- strict thread matches above, loose matches on Subject: below --
2006-05-04 10:20 compilation-ask-about-kill Alexander Klimov
2006-05-04 14:22 ` compilation-ask-about-kill Burton Samograd
2006-05-04 19:42 ` compilation-ask-about-kill Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r5pwv6no.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=alserkli@inbox.ru \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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