all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* compilation-ask-about-kill
@ 2010-01-05 14:46 Alexander Klimov
  2010-01-05 22:28 ` compilation-ask-about-kill Kevin Ryde
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Alexander Klimov @ 2010-01-05 14:46 UTC (permalink / raw)
  To: emacs-devel

Hi.

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.

On 2006-05-04, Richard Stallman wrote:
> This is not an essential change, so we should not think about it
> now. We can think about this after the release.

Probably, enough time has passed since 2006 :-) The following patch is
adapted for the current version:

*** compile.el.~1~      2010-01-05 16:22:55.983074000 +0200
--- compile.el  2010-01-05 16:25:53.882071000 +0200
***************
*** 580,583 ****
--- 580,590 ----

  ;;;###autoload
+ (defcustom compilation-ask-about-kill t
+   "Non-nil means \\[compile] asks permission to kill the running compilation.
+ Otherwise, it kills the previous compilation process without asking."
+   :type 'boolean
+   :group 'compilation)
+
+ ;;;###autoload
  (defcustom compilation-search-path '(nil)
    "List of directories to search for source files named in error messages.
***************
*** 1193,1199 ****
        (if comp-proc
            (if (or (not (eq (process-status comp-proc) 'run))
!                   (yes-or-no-p
!                    (format "A %s process is running; kill it? "
!                            name-of-mode)))
                (condition-case ()
                    (progn
--- 1200,1207 ----
        (if comp-proc
            (if (or (not (eq (process-status comp-proc) 'run))
!                 (or (not compilation-ask-about-kill)
!                     (yes-or-no-p
!                      (format "A %s process is running; kill it? "
!                              name-of-mode))))
                (condition-case ()
                    (progn

-- 
Regards,
ASK




^ permalink raw reply	[flat|nested] 14+ messages in thread
* compilation-ask-about-kill
@ 2006-05-04 10:20 Alexander Klimov
  2006-05-04 14:22 ` compilation-ask-about-kill Burton Samograd
  2006-05-04 19:42 ` compilation-ask-about-kill Richard Stallman
  0 siblings, 2 replies; 14+ messages in thread
From: Alexander Klimov @ 2006-05-04 10:20 UTC (permalink / raw)


Hi.

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.

--- compile.el.old      2006-05-04 13:07:12.685252800 +0200
+++ compile.el  2006-05-04 13:09:52.620011800 +0200
@@ -429,6 +429,13 @@
   :group 'compilation)

 ;;;###autoload
+(defcustom compilation-ask-about-kill t
+  "*Non-nil means \\[compile] asks permission to kill the running
compilation.
+Otherwise, it kills the previous compilation process  without
asking."
+  :type 'boolean
+  :group 'compilation)
+
+;;;###autoload
 (defcustom compilation-search-path '(nil)
   "*List of directories to search for source files named in error
messages.
 Elements should be directory names, not file names of directories.
@@ -970,9 +977,10 @@
       (let ((comp-proc (get-buffer-process (current-buffer))))
        (if comp-proc
            (if (or (not (eq (process-status comp-proc) 'run))
-                   (yes-or-no-p
-                    (format "A %s process is running; kill it? "
-                            name-of-mode)))
+                (or (not compilation-ask-about-kill)
+                    (yes-or-no-p
+                     (format "A %s process is running; kill it? "
+                             name-of-mode))))
                (condition-case ()
                    (progn
                      (interrupt-process comp-proc)

-- 
Regards,
ASK

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

end of thread, other threads:[~2010-01-13 22:01 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` compilation-ask-about-kill Juri Linkov
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

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.