GNU bug report logs - #32640
26.1; Make `kill-process' a command

Previous Next

Package: emacs;

Reported by: Phil Sainty <psainty <at> orcon.net.nz>

Date: Wed, 5 Sep 2018 09:34:02 UTC

Severity: wishlist

Found in version 26.1

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 32640 in the body.
You can then email your comments to 32640 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#32640; Package emacs. (Wed, 05 Sep 2018 09:34:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Phil Sainty <psainty <at> orcon.net.nz>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 05 Sep 2018 09:34:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Phil Sainty <psainty <at> orcon.net.nz>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.1; Make `kill-process' a command
Date: Wed, 5 Sep 2018 21:32:53 +1200
[Message part 1 (text/plain, inline)]
Not being able to use M-x kill-process (especially for killing

the current buffer's process) is something which has annoyed me
periodically.
[kill-process-interactive.el (text/x-emacs-lisp, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32640; Package emacs. (Wed, 05 Sep 2018 09:50:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Phil Sainty <psainty <at> orcon.net.nz>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: 26.1; Make `kill-process' a command
Date: Wed, 5 Sep 2018 21:49:40 +1200
(Apologies for the terseness of the previous message -- I managed
to send it accidentally when I'd barely started writing it.)

To repeat:

Not being able to use M-x kill-process (especially for killing
the current buffer's process) is something which has annoyed me
periodically.

`kill-process' is written in C, but it occurred to me to see
whether I could give it an interactive-form property, and was
pleased to find that it worked. What I've written seems to work
nicely -- a completing read over the `process-list' (filtered
by process-type `real'), and with the current buffer's process
provided by default.

I'm not proposing this (see attachment in previous message) as
a patch verbatim -- if this change was made, I would expect
`kill-process' to *directly* declare itself as interactive in
the C code -- but potentially `kill-process-read-arg' could be
used as I've written it (or similar) if that was agreeable?


-Phil





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32640; Package emacs. (Wed, 05 Sep 2018 10:25:01 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org, Phil Sainty <psainty <at> orcon.net.nz>,
 32640 <at> debbugs.gnu.org
Subject: Re: bug#32640: 26.1; Make `kill-process' a command
Date: Wed, 05 Sep 2018 13:23:48 +0300
On September 5, 2018 12:32:53 PM GMT+03:00, Phil Sainty <psainty <at> orcon.net.nz> wrote:
> Not being able to use M-x kill-process (especially for killing
> 
> the current buffer's process) is something which has annoyed me
> periodically.

Is something wrong with signal-process?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32640; Package emacs. (Wed, 05 Sep 2018 10:25:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32640; Package emacs. (Wed, 05 Sep 2018 12:05:01 GMT) Full text and rfc822 format available.

Message #17 received at 32640 <at> debbugs.gnu.org (full text, mbox):

From: Phil Sainty <psainty <at> orcon.net.nz>
To: Eli Zaretskii <eliz <at> gnu.org>, 32640 <at> debbugs.gnu.org
Subject: Re: bug#32640: 26.1; Make `kill-process' a command
Date: Thu, 6 Sep 2018 00:04:48 +1200
On 05/09/18 22:23, Eli Zaretskii wrote:
> Is something wrong with signal-process?

I'd failed to notice that; but yes -- interactively, I don't think
that's as good as the changes I'm suggesting, as it doesn't provide
completion for either the process or the signal (not in 26.1, at any
rate), and it doesn't offer defaults for the argument values either.
As such, unless you know offhand the the correct process name or PID
to type at the prompt, it doesn't help very much?

Despite that command existing, I think it's still useful to make
`kill-process' interactive along the general lines of the code I
wrote; and it seems to me that `signal-process' could be likewise
improved to provide equivalent completion for the process, and to
add completion for the signals.

Presumably they could both use the same function for reading the
process interactively?


-Phil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32640; Package emacs. (Wed, 05 Sep 2018 13:38:02 GMT) Full text and rfc822 format available.

Message #20 received at 32640 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Phil Sainty <psainty <at> orcon.net.nz>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 32640 <at> debbugs.gnu.org
Subject: Re: bug#32640: 26.1; Make `kill-process' a command
Date: Wed, 05 Sep 2018 15:37:13 +0200
Phil Sainty <psainty <at> orcon.net.nz> writes:

> Despite that command existing, I think it's still useful to make
> `kill-process' interactive along the general lines of the code I
> wrote; and it seems to me that `signal-process' could be likewise
> improved to provide equivalent completion for the process, and to
> add completion for the signals.

There's also `interrupt-process'. This has the additional feature to
send the SIGINT signal also to remote processes under Tramp control.

> -Phil

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32640; Package emacs. (Thu, 06 Sep 2018 03:04:02 GMT) Full text and rfc822 format available.

Message #23 received at 32640 <at> debbugs.gnu.org (full text, mbox):

From: Phil Sainty <psainty <at> orcon.net.nz>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 32640 <at> debbugs.gnu.org
Subject: Re: bug#32640: 26.1; Make `kill-process' a command
Date: Thu, 06 Sep 2018 15:03:35 +1200
On 2018-09-06 01:37, Michael Albinus wrote:
> There's also `interrupt-process'. This has the additional feature to
> send the SIGINT signal also to remote processes under Tramp control.

Is `interrupt-process' unique in this regard, Michael?

Checking "(elisp)Signals to Processes" shows me all of:

     -- Function: interrupt-process &optional process current-group
     -- Function: kill-process &optional process current-group
     -- Function: quit-process &optional process current-group
     -- Function: stop-process &optional process current-group
     -- Function: continue-process &optional process current-group
     -- Command: signal-process process signal

I feel that `kill-process' is more of a special case than the others
(to my mind it's more likely for a user to want to kill an inferior
process than to want to send one of the other signals; but maybe
that's just me?).  So personally I'm not fussed about making all of
these things commands; but it seems that all of those functions could
share common code for obtaining interactive arguments, so presumably
if it was done for one then it would be very straightforward to
convert the others as well if that was seen as beneficial.


-Phil





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32640; Package emacs. (Thu, 06 Sep 2018 06:58:02 GMT) Full text and rfc822 format available.

Message #26 received at 32640 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Phil Sainty <psainty <at> orcon.net.nz>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 32640 <at> debbugs.gnu.org
Subject: Re: bug#32640: 26.1; Make `kill-process' a command
Date: Thu, 06 Sep 2018 08:56:53 +0200
Phil Sainty <psainty <at> orcon.net.nz> writes:

Hi Phil,

>> There's also `interrupt-process'. This has the additional feature to
>> send the SIGINT signal also to remote processes under Tramp control.
>
> Is `interrupt-process' unique in this regard, Michael?

Yes.

> -Phil

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32640; Package emacs. (Sun, 23 Jan 2022 13:41:02 GMT) Full text and rfc822 format available.

Message #29 received at 32640 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Phil Sainty <psainty <at> orcon.net.nz>
Cc: 32640 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Michael Albinus <michael.albinus <at> gmx.de>
Subject: Re: bug#32640: 26.1; Make `kill-process' a command
Date: Sun, 23 Jan 2022 14:39:54 +0100
Phil Sainty <psainty <at> orcon.net.nz> writes:

> Checking "(elisp)Signals to Processes" shows me all of:
>
>      -- Function: interrupt-process &optional process current-group
>      -- Function: kill-process &optional process current-group
>      -- Function: quit-process &optional process current-group
>      -- Function: stop-process &optional process current-group
>      -- Function: continue-process &optional process current-group
>      -- Command: signal-process process signal
>
> I feel that `kill-process' is more of a special case than the others
> (to my mind it's more likely for a user to want to kill an inferior
> process than to want to send one of the other signals; but maybe
> that's just me?).  So personally I'm not fussed about making all of
> these things commands; but it seems that all of those functions could
> share common code for obtaining interactive arguments, so presumably
> if it was done for one then it would be very straightforward to
> convert the others as well if that was seen as beneficial.

I've added your process prompting function to Emacs 29 (with some
trivial changes).  I think it makes sense to make kill-process into a
command (because I think that's a command people want to have), so I've
now done that.  The other ones -- I don't think there's much demand for
having those as commands, but if we want to, it's now trivial to do.

But I think we should wait to do so to see if anybody requests that, so
I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 32640 <at> debbugs.gnu.org and Phil Sainty <psainty <at> orcon.net.nz> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 23 Jan 2022 13:41:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 21 Feb 2022 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 57 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.