GNU bug report logs -
#12288
24.2.50; compilation-start: Query for killing existing compilation process only if query-on-exit-flag is non-nil
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 12288 in the body.
You can then email your comments to 12288 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12288
; Package
emacs
.
(Mon, 27 Aug 2012 14:58:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Christopher Schmidt <christopher <at> ch.ristopher.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 27 Aug 2012 14:58:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Severity: wishlist
I find it annoying that compilation-start always asks before killing
the previous (running) compilation process. I think
process-query-on-exit-flag should be taken into account here.
[compilation-start.diff (text/x-diff, inline)]
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog 2012-08-27 09:05:55 +0000
+++ lisp/ChangeLog 2012-08-27 14:48:56 +0000
@@ -1,3 +1,9 @@
+2012-08-27 Christopher Schmidt <christopher <at> ch.ristopher.com>
+
+ * progmodes/compile.el (compilation-start): Query for killing
+ existing compilation process only if query-on-exit-flag is non-nil
+ (Bug#).
+
2012-08-27 Drew Adams <drew.adams <at> oracle.com>
* dired.el (dired-pop-to-buffer): Make window start at beginning
=== modified file 'lisp/progmodes/compile.el'
--- lisp/progmodes/compile.el 2012-08-26 13:42:18 +0000
+++ lisp/progmodes/compile.el 2012-08-27 14:47:23 +0000
@@ -1537,6 +1537,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)))
[Message part 3 (text/plain, inline)]
Christopher
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12288
; Package
emacs
.
(Sat, 01 Sep 2012 11:01:02 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
Christopher Schmidt <christopher <at> ch.ristopher.com> writes:
> I find it annoying that compilation-start always asks before killing
> the previous (running) compilation process. I think
> process-query-on-exit-flag should be taken into account here.
Revno 109813 introduces variable compilation-always-kill which, if
non-nil, unconditionally removes the query for killing the compilation
process.
This variable does not help me as occasionally I want to be asked
whether I would like to kill the compilation process.
Can both compilation-always-kill and query-on-exit-flag be taken into
account?
Christopher
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12288
; Package
emacs
.
(Sat, 01 Sep 2012 12:35:02 GMT)
Full text and
rfc822 format available.
Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
> This variable does not help me as occasionally I want to be asked
> whether I would like to kill the compilation process.
Would setting the variable buffer-locally solve that problem?
Stefan
Reply sent
to
Christopher Schmidt <christopher <at> ch.ristopher.com>
:
You have taken responsibility.
(Sat, 01 Sep 2012 12:47:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Christopher Schmidt <christopher <at> ch.ristopher.com>
:
bug acknowledged by developer.
(Sat, 01 Sep 2012 12:47:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 12288-done <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> This variable does not help me as occasionally I want to be asked
>> whether I would like to kill the compilation process.
>
> Would setting the variable buffer-locally solve that problem?
It does.
Christopher
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12288
; Package
emacs
.
(Sat, 01 Sep 2012 15:13:01 GMT)
Full text and
rfc822 format available.
Message #19 received at submit <at> debbugs.gnu.org (full text, mbox):
I'm not sure I understand. Let's recap a bit:
a. in 'compilation-start-hook, there's a hint that you can force the
process-query-on-exit-flag on the compile process; that would presumably
allow you to kill the buffer without a query, but not on a subsequent call to
compile. (BTW I just tried the suggested hook as is and it doesn't work for
me, but that's another issue).
b. compilation-always-kill can now be set to 't to suppress the query on another
invocation to compile. Note that the new variable does not change the current
behaviour, the default value is to ask. This should not affect what happens
when you try to kill the buffer on a running process.
So I don't understand the question. Which of the events are you referring to?
(a) or (b)?
And if (b), given that the variable does not change the behaviour, what do you
mean?
On Sat, Sep 1, 2012, at 06:58, Christopher Schmidt wrote:
> Christopher Schmidt <christopher <at> ch.ristopher.com> writes:
> > I find it annoying that compilation-start always asks before killing
> > the previous (running) compilation process. I think
> > process-query-on-exit-flag should be taken into account here.
>
> Revno 109813 introduces variable compilation-always-kill which, if
> non-nil, unconditionally removes the query for killing the compilation
> process.
>
> This variable does not help me as occasionally I want to be asked
> whether I would like to kill the compilation process.
>
> Can both compilation-always-kill and query-on-exit-flag be taken into
> account?
>
> Christopher
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12288
; Package
emacs
.
(Sat, 01 Sep 2012 15:31:01 GMT)
Full text and
rfc822 format available.
Message #22 received at submit <at> debbugs.gnu.org (full text, mbox):
Martin Blais <blais <at> furius.ca> writes:
> I'm not sure I understand. Let's recap a bit:
>
> a. in 'compilation-start-hook, there's a hint that you can force the
> process-query-on-exit-flag on the compile process; that would
> presumably allow you to kill the buffer without a query, but not on a
^^^^^^^^^^^^
> subsequent call to compile. (BTW I just tried the suggested hook as is
^^^^^^^^^^^^^^^^^^^^^^^^^^
> and it doesn't work for me, but that's another issue).
This is exactly what I don't want.
Those processes that have a nil query-on-exit-flag should be killed by
compilation-start without a yes-or-no query. A buffer-local non-nil
value for compilation-always-kill allows me to achieve that.
I still think a check for query-on-exit-flag in compilation-start is a
good idea. Non-nil query-on-exit-flag and non-nil buffer-local
compilation-always-kill feels redundant, doesn't it?
Christopher
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12288
; Package
emacs
.
(Sat, 01 Sep 2012 18:20:01 GMT)
Full text and
rfc822 format available.
Message #25 received at submit <at> debbugs.gnu.org (full text, mbox):
On Sat, Sep 1, 2012, at 11:29, Christopher Schmidt wrote:
> Martin Blais <blais <at> furius.ca> writes:
> > I'm not sure I understand. Let's recap a bit:
> >
> > a. in 'compilation-start-hook, there's a hint that you can force the
> > process-query-on-exit-flag on the compile process; that would
> > presumably allow you to kill the buffer without a query, but not on a
> ^^^^^^^^^^^^
> > subsequent call to compile. (BTW I just tried the suggested hook as is
> ^^^^^^^^^^^^^^^^^^^^^^^^^^
> > and it doesn't work for me, but that's another issue).
>
> This is exactly what I don't want.
>
> Those processes that have a nil query-on-exit-flag should be killed by
> compilation-start without a yes-or-no query. A buffer-local non-nil
> value for compilation-always-kill allows me to achieve that.
>
> I still think a check for query-on-exit-flag in compilation-start is a
> good idea. Non-nil query-on-exit-flag and non-nil buffer-local
> compilation-always-kill feels redundant, doesn't it?
Maybe what we should do is this (just an idea, not sure if it'll make sense to
you):
1. Make the compile code check the process-query-on-exit-flag instead of the
compilation-always-kill variable. This would simplify matters, in that
there's a single flag that decides whether to kill the running process, and
it's the same flag that's already being used for when you kill a buffer. One
thing.
2. Provide a way to set the default value of process-query-on-exit-flag on
compile subprocesses easier than the hook/comment. Suppressing the ask on
recompile is a very common desire BTW--some people have packages to do just
that--and IMO being able to customize this via a dedicated variable is
valuable.
What do you think?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12288
; Package
emacs
.
(Sun, 02 Sep 2012 01:24:02 GMT)
Full text and
rfc822 format available.
Message #28 received at submit <at> debbugs.gnu.org (full text, mbox):
Martin Blais <blais <at> furius.ca> writes:
> On Sat, Sep 1, 2012, at 11:29, Christopher Schmidt wrote:
>> Those processes that have a nil query-on-exit-flag should be killed
>> by compilation-start without a yes-or-no query. A buffer-local
>> non-nil value for compilation-always-kill allows me to achieve that.
>>
>> I still think a check for query-on-exit-flag in compilation-start is
>> a good idea. Non-nil query-on-exit-flag and non-nil buffer-local
>> compilation-always-kill feels redundant, doesn't it?
>
> Maybe what we should do is this (just an idea, not sure if it'll make
> sense to you):
>
> 1. Make the compile code check the process-query-on-exit-flag instead
> of the compilation-always-kill variable. This would simplify matters,
> in that there's a single flag that decides whether to kill the running
> process, and it's the same flag that's already being used for when you
> kill a buffer. One thing.
>
> 2. Provide a way to set the default value of
> process-query-on-exit-flag on compile subprocesses easier than the
> hook/comment. Suppressing the ask on recompile is a very common desire
> BTW--some people have packages to do just that--and IMO being able to
> customize this via a dedicated variable is valuable.
>
> What do you think?
This is IMO a lot more intuitive than having a variable that
unconditionally removes the prompt. I'd go for it.
Christopher
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12288
; Package
emacs
.
(Wed, 05 Sep 2012 01:52:01 GMT)
Full text and
rfc822 format available.
Message #31 received at submit <at> debbugs.gnu.org (full text, mbox):
Salut Stef,
Here is a new patch for compile.el that has the change as described by
Christopher. "compilation-always-kill" is consulted to initialize the
process-query-on-exit-flag when creating a new process, and the
process flag is examined when deciding to query to kill the running
process or not.
=== modified file 'lisp/progmodes/compile.el'
*** lisp/progmodes/compile.el 2012-08-30 08:22:24 +0000
--- lisp/progmodes/compile.el 2012-09-04 18:38:00 +0000
***************
*** 1544,1550 ****
(let ((comp-proc (get-buffer-process (current-buffer))))
(if comp-proc
(if (or (not (eq (process-status comp-proc) 'run))
! compilation-always-kill
(yes-or-no-p
(format "A %s process is running; kill it? "
name-of-mode)))
--- 1544,1550 ----
(let ((comp-proc (get-buffer-process (current-buffer))))
(if comp-proc
(if (or (not (eq (process-status comp-proc) 'run))
! (eq (process-query-on-exit-flag comp-proc) nil)
(yes-or-no-p
(format "A %s process is running; kill it? "
name-of-mode)))
***************
*** 1663,1668 ****
--- 1663,1675 ----
;; Make the buffer's mode line show process state.
(setq mode-line-process
'(:propertize ":%s" face compilation-mode-line-run))
+
+ ;; Set the process as killable without query by default.
+ ;; This allows us to start a new compilation without
+ ;; getting prompted.
+ (when compilation-always-kill
+ (set-process-query-on-exit-flag proc nil))
+
(set-process-sentinel proc 'compilation-sentinel)
(unless (eq mode t)
;; Keep the comint filter, since it's needed for proper handling
On Sat, Sep 1, 2012, at 21:21, Christopher Schmidt wrote:
> Martin Blais <blais <at> furius.ca> writes:
> > On Sat, Sep 1, 2012, at 11:29, Christopher Schmidt wrote:
> >> Those processes that have a nil query-on-exit-flag should be killed
> >> by compilation-start without a yes-or-no query. A buffer-local
> >> non-nil value for compilation-always-kill allows me to achieve that.
> >>
> >> I still think a check for query-on-exit-flag in compilation-start is
> >> a good idea. Non-nil query-on-exit-flag and non-nil buffer-local
> >> compilation-always-kill feels redundant, doesn't it?
> >
> > Maybe what we should do is this (just an idea, not sure if it'll make
> > sense to you):
> >
> > 1. Make the compile code check the process-query-on-exit-flag instead
> > of the compilation-always-kill variable. This would simplify matters,
> > in that there's a single flag that decides whether to kill the running
> > process, and it's the same flag that's already being used for when you
> > kill a buffer. One thing.
> >
> > 2. Provide a way to set the default value of
> > process-query-on-exit-flag on compile subprocesses easier than the
> > hook/comment. Suppressing the ask on recompile is a very common desire
> > BTW--some people have packages to do just that--and IMO being able to
> > customize this via a dedicated variable is valuable.
> >
> > What do you think?
>
> This is IMO a lot more intuitive than having a variable that
> unconditionally removes the prompt. I'd go for it.
>
> Christopher
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12288
; Package
emacs
.
(Tue, 18 Sep 2012 04:21:02 GMT)
Full text and
rfc822 format available.
Message #34 received at 12288-done <at> debbugs.gnu.org (full text, mbox):
> Here is a new patch for compile.el that has the change as described by
> Christopher. "compilation-always-kill" is consulted to initialize the
> process-query-on-exit-flag when creating a new process, and the
> process flag is examined when deciding to query to kill the running
> process or not.
Thanks Martin, installed,
Setfan
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 16 Oct 2012 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 309 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.