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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Phil Sainty <psainty@HIDDEN>; dated Wed, 5 Sep 2018 09:34:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 32640 <at> debbugs.gnu.org:


Received: (at 32640) by debbugs.gnu.org; 6 Sep 2018 06:57:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 06 02:57:12 2018
Received: from localhost ([127.0.0.1]:47616 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fxoE4-0000GE-Ag
	for submit <at> debbugs.gnu.org; Thu, 06 Sep 2018 02:57:12 -0400
Received: from mout.gmx.net ([212.227.17.22]:33951)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael.albinus@HIDDEN>) id 1fxoE2-0000G2-PE
 for 32640 <at> debbugs.gnu.org; Thu, 06 Sep 2018 02:57:11 -0400
Received: from detlef.gmx.de ([79.140.121.49]) by mail.gmx.com (mrgmx102
 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LhkiL-1fTCLu1uin-00mtMu; Thu, 06
 Sep 2018 08:56:55 +0200
From: Michael Albinus <michael.albinus@HIDDEN>
To: Phil Sainty <psainty@HIDDEN>
Subject: Re: bug#32640: 26.1; Make `kill-process' a command
References: <c1c3fc1e-2134-b819-142c-b2e23901745e@HIDDEN>
 <C590E15D-3C8F-4DC0-82FE-6CBAB28DD777@HIDDEN>
 <ffd3f65a-b814-fcef-9573-3d93ed0a7cce@HIDDEN>
 <877ek0gj5i.fsf@HIDDEN>
 <6714f5afefd50ea23aa0f500f4c50edf@HIDDEN>
Date: Thu, 06 Sep 2018 08:56:53 +0200
In-Reply-To: <6714f5afefd50ea23aa0f500f4c50edf@HIDDEN> (Phil
 Sainty's message of "Thu, 06 Sep 2018 15:03:35 +1200")
Message-ID: <87tvn3qfka.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:t6IVeMyw7chA9HEL1EgY+wB26IwBvKmTd/idUPWyB7PzqhH3MWp
 rd1Z40p7iq4CscIZmx+JfnqxBzyGUOA5jp6AdXnfG/akQ4nKWYaOEgGprrof9MlAId9Z4Ma
 0JCRPHhWITgICp0oFf/85zKxFgH84zgUzqY+VA9XLLrjeKaDTGAFV9+2St+a+L9EH+Ubkr8
 8qag5VusCNPWRlg/OqpcA==
X-UI-Out-Filterresults: notjunk:1;V01:K0:0NYnazdFLgU=:9SksXzREWaTPjjUvGNzR0F
 lT7CUqGM2UEd1A3AsJbO6sTjvqqjcHCr/PXtgnLT1jALmL+d4amubF3m2s6//lMSDs2thVJ5+
 duEtokVW+hdqik8hmWeXzy8e80DAjul907O2bpIEqARCPJ3RFv7LfXnefwtNdjdhkn9K7H6+q
 IZhB8oeU0BrH91CTi7HSutUIJO9eOuwriFqIPKDH3eNP8whpgCOoHGo6wAgz6Lso+zjB64Doa
 2uAikczVIp1PUq+jTeTjoWjZHqxZNN7g3HhI3gUG57nHWr2C3CxumV2/oOoigrdzIrK7aBjWQ
 hdzd/ERWYa0Hp/ZbMHu/HMwPjse5a67l9pyILp13H1YBTiIWl04vjkMyW9ifM3MRs+LF1ttCz
 pUFvxPXw1ZbVDHYHNSXLyMlfixgMnIlcfkR8j4IQg+b+CXVCCXAq27525rp6NpJ5kZjwjr52d
 +JqCA/PY845LMVKrmwc79JP/nKzpcOKXU8nG11icKPTfX846RibkAB9WfRIGVsBYkZhkxfuNw
 LQ/fdxuO5cSUyujU0tJ9iPs2O12ioDeDZ1ao3YVEPWy4q4e2sVQckh4a4+7aakfEirtwheOPS
 Wy9NjyzQzY9SsJg4xDyBiImABU7YdkD+/fDStWfbn+TDSn8OTPfvUruhm0CFNRpbHbw/+I3Xw
 Mrt9nCHLCBBgBvGMIVRggTy4pkg5M08Ii7prYmCampcWzl5vOEuhJQA0LHYblmB/X8agQ/k20
 /nd8Geq0Yuc0MNkchbxdsUqNVK+rvF9iRwQDrAALDEuw7uUsvEICyVJJEbzHHHciWn7cmFBTZ
 ThUqZuk
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 32640
Cc: Eli Zaretskii <eliz@HIDDEN>, 32640 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Phil Sainty <psainty@HIDDEN> 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@HIDDEN:
bug#32640; Package emacs. Full text available.

Message received at 32640 <at> debbugs.gnu.org:


Received: (at 32640) by debbugs.gnu.org; 6 Sep 2018 03:03:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 05 23:03:44 2018
Received: from localhost ([127.0.0.1]:47563 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fxka8-0002l6-98
	for submit <at> debbugs.gnu.org; Wed, 05 Sep 2018 23:03:44 -0400
Received: from smtp-4.orcon.net.nz ([60.234.4.59]:43170)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <psainty@HIDDEN>) id 1fxka5-0002kx-TM
 for 32640 <at> debbugs.gnu.org; Wed, 05 Sep 2018 23:03:43 -0400
Received: from [10.253.37.70] (port=1541 helo=webmail.orcon.net.nz)
 by smtp-4.orcon.net.nz with esmtpa (Exim 4.86_2)
 (envelope-from <psainty@HIDDEN>)
 id 1fxkZz-0004RH-BM; Thu, 06 Sep 2018 15:03:35 +1200
Received: from wlgwil-nat-office.catalyst.net.nz ([202.78.240.7])
 via [10.253.37.253] by webmail.orcon.net.nz
 with HTTP (HTTP/1.1 POST); Thu, 06 Sep 2018 15:03:35 +1200
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
Date: Thu, 06 Sep 2018 15:03:35 +1200
From: Phil Sainty <psainty@HIDDEN>
To: Michael Albinus <michael.albinus@HIDDEN>
Subject: Re: bug#32640: 26.1; Make `kill-process' a command
In-Reply-To: <877ek0gj5i.fsf@HIDDEN>
References: <c1c3fc1e-2134-b819-142c-b2e23901745e@HIDDEN>
 <C590E15D-3C8F-4DC0-82FE-6CBAB28DD777@HIDDEN>
 <ffd3f65a-b814-fcef-9573-3d93ed0a7cce@HIDDEN> <877ek0gj5i.fsf@HIDDEN>
Message-ID: <6714f5afefd50ea23aa0f500f4c50edf@HIDDEN>
X-Sender: psainty@HIDDEN
User-Agent: Orcon Webmail
X-GeoIP: --
X-Spam_score: -2.9
X-Spam_score_int: -28
X-Spam_bar: --
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 32640
Cc: Eli Zaretskii <eliz@HIDDEN>, 32640 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

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@HIDDEN:
bug#32640; Package emacs. Full text available.

Message received at 32640 <at> debbugs.gnu.org:


Received: (at 32640) by debbugs.gnu.org; 5 Sep 2018 13:37:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 05 09:37:30 2018
Received: from localhost ([127.0.0.1]:46521 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fxXzu-0004Lc-Ge
	for submit <at> debbugs.gnu.org; Wed, 05 Sep 2018 09:37:30 -0400
Received: from mout.gmx.net ([212.227.15.19]:55479)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael.albinus@HIDDEN>) id 1fxXzs-0004LO-O7
 for 32640 <at> debbugs.gnu.org; Wed, 05 Sep 2018 09:37:29 -0400
Received: from detlef.gmx.de ([213.220.156.160]) by mail.gmx.com (mrgmx001
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MSuMn-1gMX8h0TSf-00Rmkw; Wed, 05
 Sep 2018 15:37:14 +0200
From: Michael Albinus <michael.albinus@HIDDEN>
To: Phil Sainty <psainty@HIDDEN>
Subject: Re: bug#32640: 26.1; Make `kill-process' a command
References: <c1c3fc1e-2134-b819-142c-b2e23901745e@HIDDEN>
 <C590E15D-3C8F-4DC0-82FE-6CBAB28DD777@HIDDEN>
 <ffd3f65a-b814-fcef-9573-3d93ed0a7cce@HIDDEN>
Date: Wed, 05 Sep 2018 15:37:13 +0200
In-Reply-To: <ffd3f65a-b814-fcef-9573-3d93ed0a7cce@HIDDEN> (Phil
 Sainty's message of "Thu, 6 Sep 2018 00:04:48 +1200")
Message-ID: <877ek0gj5i.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:lBLuQTVNIufRKDELQu//CdIn/6yziWuDyVx3h5Ur8H+eFT5yhXe
 JFjj7qWfjujjlnBUfkNMpbX8foZD0UHhvILvIK59LZqNeemWF7icTumZMUklW3c2xiyWcsA
 O1Z6GUj/lOYGiwRO5C9cG1rH23v0HOA6AHOr4+btpqhKhMv8O7maKA6frqO9BEBkj8UmWDM
 Itg/Xn6yXa+i6YIq+BCrw==
X-UI-Out-Filterresults: notjunk:1;V01:K0:rM4UWJ3K79Y=:SDwrs0BWs/CDv5hlO80K6y
 7MmGKXrQNchMmS2JAfEjGiHYc2LfQJrJ3YJd3q41w7LrZ93nXDnMpuk5ctt1JYGkJgIqJSGDs
 F6xkO5Q20tkCxWiEe0u4Tg5gFu7qP+mvUqr8EHRXZm0jkvi1fMBM3tHUUC+kDer/p0TpPkqdS
 ezMh9gjsUHU6BaJbRXX5mvY3qiMxs9ZrC66Z/I2w8x9OHK88R9LEyPrDsdJNTlNZVhWczRiJv
 gLym2sC6sWrO3vpqzXIHnBilk4ChnuahiC096qP2tps7dhkDNM7eszBudCXtFhJlNMKSHlyNh
 RSMAClq6t8WX0zAC5p2XFC7nxB2posbht+ni3YiDfXt7nsBNkX6X3Eotu/8aHq3sDwRm7ZZUH
 LPckeCRQWIB1gpwkQAd/5AphU2oOpXOSmTWxkrjLuPS5SsYzgAwt6UdkrkiqlwO9oV1u0mUnu
 H+RrCpl+ChW21yCyzgUgDX/kXd788nnTJy/yHZo5we8504ne/95D0DbTcCguukE1j4I4TV0dF
 7hrtOdsWNzwtNXlBRIpOaJDesem5ehkaRD4Su2z/Asyyat28OKYBtm/eqm3ZITYBe999eNsbT
 TE0v+r6Xp2FNSbv+mBO9S1Qw1jL0wDe9zazVkDPxhOrY8qV67uWD6J1RpdlcKYwIU7y3jQiIw
 a4epgS+PfnUk9n0gpVpPUSK2khj4iYUTLZtVQavCK2DOygRpj47wcWsa31o6gsHX/KWwU8bcy
 iBjS/g1ukEryWjWPv39C13QMl0ZUkxkdg4sP4rlpwMyYYcquQX+4zoED9oqKKXQ4WB2nl24Q+
 Ags470F
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 32640
Cc: Eli Zaretskii <eliz@HIDDEN>, 32640 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Phil Sainty <psainty@HIDDEN> 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@HIDDEN:
bug#32640; Package emacs. Full text available.

Message received at 32640 <at> debbugs.gnu.org:


Received: (at 32640) by debbugs.gnu.org; 5 Sep 2018 12:04:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 05 08:04:54 2018
Received: from localhost ([127.0.0.1]:46461 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fxWYI-00020H-E3
	for submit <at> debbugs.gnu.org; Wed, 05 Sep 2018 08:04:54 -0400
Received: from smtp-1.orcon.net.nz ([60.234.4.34]:42846)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <psainty@HIDDEN>) id 1fxWYG-000204-87
 for 32640 <at> debbugs.gnu.org; Wed, 05 Sep 2018 08:04:53 -0400
Received: from [150.107.172.33] (port=63291 helo=[192.168.20.103])
 by smtp-1.orcon.net.nz with esmtpa (Exim 4.86_2)
 (envelope-from <psainty@HIDDEN>)
 id 1fxWYC-0003pD-Mu; Thu, 06 Sep 2018 00:04:48 +1200
Subject: Re: bug#32640: 26.1; Make `kill-process' a command
To: Eli Zaretskii <eliz@HIDDEN>, 32640 <at> debbugs.gnu.org
References: <c1c3fc1e-2134-b819-142c-b2e23901745e@HIDDEN>
 <C590E15D-3C8F-4DC0-82FE-6CBAB28DD777@HIDDEN>
From: Phil Sainty <psainty@HIDDEN>
Message-ID: <ffd3f65a-b814-fcef-9573-3d93ed0a7cce@HIDDEN>
Date: Thu, 6 Sep 2018 00:04:48 +1200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.9.1
MIME-Version: 1.0
In-Reply-To: <C590E15D-3C8F-4DC0-82FE-6CBAB28DD777@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-GB
Content-Transfer-Encoding: 7bit
X-GeoIP: NZ
X-Spam_score: -2.9
X-Spam_score_int: -28
X-Spam_bar: --
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 32640
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

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@HIDDEN:
bug#32640; Package emacs. Full text available.

Message received at 32640 <at> debbugs.gnu.org:


Received: (at 32640) by debbugs.gnu.org; 5 Sep 2018 10:24:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 05 06:24:22 2018
Received: from localhost ([127.0.0.1]:46422 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fxUz0-0005lv-Nz
	for submit <at> debbugs.gnu.org; Wed, 05 Sep 2018 06:24:22 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41639)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1fxUyz-0005lg-Gm
 for 32640 <at> debbugs.gnu.org; Wed, 05 Sep 2018 06:24:21 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1fxUyl-0008Sk-1Z
 for 32640 <at> debbugs.gnu.org; Wed, 05 Sep 2018 06:24:14 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39724)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1fxUyW-0008Dr-K1; Wed, 05 Sep 2018 06:23:52 -0400
Received: from [176.13.251.218] (port=45526 helo=[10.131.245.79])
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1fxUyW-0003Cs-2n; Wed, 05 Sep 2018 06:23:52 -0400
Date: Wed, 05 Sep 2018 13:23:48 +0300
User-Agent: K-9 Mail for Android
In-Reply-To: <c1c3fc1e-2134-b819-142c-b2e23901745e@HIDDEN>
References: <c1c3fc1e-2134-b819-142c-b2e23901745e@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable
Subject: Re: bug#32640: 26.1; Make `kill-process' a command
To: bug-gnu-emacs@HIDDEN, Phil Sainty <psainty@HIDDEN>,
 32640 <at> debbugs.gnu.org
From: Eli Zaretskii <eliz@HIDDEN>
Message-ID: <C590E15D-3C8F-4DC0-82FE-6CBAB28DD777@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 32640
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

On September 5, 2018 12:32:53 PM GMT+03:00, Phil Sainty <psainty@orcon=2Ene=
t=2Enz> wrote:
> Not being able to use M-x kill-process (especially for killing
>=20
> the current buffer's process) is something which has annoyed me
> periodically=2E

Is something wrong with signal-process?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#32640; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 5 Sep 2018 10:24:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 05 06:24:05 2018
Received: from localhost ([127.0.0.1]:46419 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fxUyj-0005lN-Bs
	for submit <at> debbugs.gnu.org; Wed, 05 Sep 2018 06:24:05 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41577)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1fxUyi-0005kn-5j
 for submit <at> debbugs.gnu.org; Wed, 05 Sep 2018 06:24:04 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1fxUyc-0008JN-Fw
 for submit <at> debbugs.gnu.org; Wed, 05 Sep 2018 06:23:59 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:55222)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <eliz@HIDDEN>) id 1fxUyc-0008J8-Bb
 for submit <at> debbugs.gnu.org; Wed, 05 Sep 2018 06:23:58 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:34322)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1fxUyb-0003Z8-L9
 for bug-gnu-emacs@HIDDEN; Wed, 05 Sep 2018 06:23:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1fxUyW-0008EA-OR
 for bug-gnu-emacs@HIDDEN; Wed, 05 Sep 2018 06:23:57 -0400
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39724)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1fxUyW-0008Dr-K1; Wed, 05 Sep 2018 06:23:52 -0400
Received: from [176.13.251.218] (port=45526 helo=[10.131.245.79])
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1fxUyW-0003Cs-2n; Wed, 05 Sep 2018 06:23:52 -0400
Date: Wed, 05 Sep 2018 13:23:48 +0300
User-Agent: K-9 Mail for Android
In-Reply-To: <c1c3fc1e-2134-b819-142c-b2e23901745e@HIDDEN>
References: <c1c3fc1e-2134-b819-142c-b2e23901745e@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable
Subject: Re: bug#32640: 26.1; Make `kill-process' a command
To: bug-gnu-emacs@HIDDEN, Phil Sainty <psainty@HIDDEN>,
 32640 <at> debbugs.gnu.org
From: Eli Zaretskii <eliz@HIDDEN>
Message-ID: <C590E15D-3C8F-4DC0-82FE-6CBAB28DD777@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

On September 5, 2018 12:32:53 PM GMT+03:00, Phil Sainty <psainty@orcon=2Ene=
t=2Enz> wrote:
> Not being able to use M-x kill-process (especially for killing
>=20
> the current buffer's process) is something which has annoyed me
> periodically=2E

Is something wrong with signal-process?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#32640; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 5 Sep 2018 09:49:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 05 05:49:59 2018
Received: from localhost ([127.0.0.1]:46387 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fxURj-0002sw-5h
	for submit <at> debbugs.gnu.org; Wed, 05 Sep 2018 05:49:59 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33037)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <psainty@HIDDEN>) id 1fxURh-0002si-FZ
 for submit <at> debbugs.gnu.org; Wed, 05 Sep 2018 05:49:57 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <psainty@HIDDEN>) id 1fxURb-00038T-Go
 for submit <at> debbugs.gnu.org; Wed, 05 Sep 2018 05:49:52 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:43586)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <psainty@HIDDEN>)
 id 1fxURb-00037b-DG
 for submit <at> debbugs.gnu.org; Wed, 05 Sep 2018 05:49:51 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:54013)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <psainty@HIDDEN>) id 1fxURa-000666-Fk
 for bug-gnu-emacs@HIDDEN; Wed, 05 Sep 2018 05:49:51 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <psainty@HIDDEN>) id 1fxURV-0002oN-Cx
 for bug-gnu-emacs@HIDDEN; Wed, 05 Sep 2018 05:49:50 -0400
Received: from smtp-3.orcon.net.nz ([60.234.4.44]:42983)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <psainty@HIDDEN>)
 id 1fxURV-0002ji-1p
 for bug-gnu-emacs@HIDDEN; Wed, 05 Sep 2018 05:49:45 -0400
Received: from [150.107.172.33] (port=5542 helo=[192.168.20.103])
 by smtp-3.orcon.net.nz with esmtpa (Exim 4.86_2)
 (envelope-from <psainty@HIDDEN>) id 1fxURQ-0002r6-TB
 for bug-gnu-emacs@HIDDEN; Wed, 05 Sep 2018 21:49:41 +1200
Subject: Re: 26.1; Make `kill-process' a command
From: Phil Sainty <psainty@HIDDEN>
To: bug-gnu-emacs@HIDDEN
References: <c1c3fc1e-2134-b819-142c-b2e23901745e@HIDDEN>
Message-ID: <ae82b4c5-8c60-0de9-15fa-d828d13209fd@HIDDEN>
Date: Wed, 5 Sep 2018 21:49:40 +1200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.9.1
MIME-Version: 1.0
In-Reply-To: <c1c3fc1e-2134-b819-142c-b2e23901745e@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-GB
Content-Transfer-Encoding: 7bit
X-GeoIP: NZ
X-Spam_score: -2.9
X-Spam_score_int: -28
X-Spam_bar: --
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.3 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.3 (-----)

(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@HIDDEN:
bug#32640; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 5 Sep 2018 09:33:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 05 05:33:14 2018
Received: from localhost ([127.0.0.1]:46372 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fxUBW-0002Th-Id
	for submit <at> debbugs.gnu.org; Wed, 05 Sep 2018 05:33:14 -0400
Received: from eggs.gnu.org ([208.118.235.92]:56383)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <psainty@HIDDEN>) id 1fxUBU-0002TT-JU
 for submit <at> debbugs.gnu.org; Wed, 05 Sep 2018 05:33:13 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <psainty@HIDDEN>) id 1fxUBO-0004B8-95
 for submit <at> debbugs.gnu.org; Wed, 05 Sep 2018 05:33:07 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:48014)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <psainty@HIDDEN>)
 id 1fxUBO-00049j-4F
 for submit <at> debbugs.gnu.org; Wed, 05 Sep 2018 05:33:06 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:49128)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <psainty@HIDDEN>) id 1fxUBN-0005X7-4C
 for bug-gnu-emacs@HIDDEN; Wed, 05 Sep 2018 05:33:05 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <psainty@HIDDEN>) id 1fxUBJ-0003r1-S5
 for bug-gnu-emacs@HIDDEN; Wed, 05 Sep 2018 05:33:05 -0400
Received: from smtp-3.orcon.net.nz ([60.234.4.44]:49728)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <psainty@HIDDEN>)
 id 1fxUBJ-0003QZ-FF
 for bug-gnu-emacs@HIDDEN; Wed, 05 Sep 2018 05:33:01 -0400
Received: from [150.107.172.33] (port=53918 helo=[192.168.20.103])
 by smtp-3.orcon.net.nz with esmtpa (Exim 4.86_2)
 (envelope-from <psainty@HIDDEN>) id 1fxUBC-0001ul-EA
 for bug-gnu-emacs@HIDDEN; Wed, 05 Sep 2018 21:32:54 +1200
To: bug-gnu-emacs@HIDDEN
From: Phil Sainty <psainty@HIDDEN>
Subject: 26.1; Make `kill-process' a command
Message-ID: <c1c3fc1e-2134-b819-142c-b2e23901745e@HIDDEN>
Date: Wed, 5 Sep 2018 21:32:53 +1200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.9.1
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------CDEE2D066AC229EE3620A37B"
Content-Language: en-GB
X-GeoIP: NZ
X-Spam_score: -2.9
X-Spam_score_int: -28
X-Spam_bar: --
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.3 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.3 (-----)

This is a multi-part message in MIME format.
--------------CDEE2D066AC229EE3620A37B
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

Not being able to use M-x kill-process (especially for killing

the current buffer's process) is something which has annoyed me
periodically.

--------------CDEE2D066AC229EE3620A37B
Content-Type: text/x-emacs-lisp;
 name="kill-process-interactive.el"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="kill-process-interactive.el"

;; Make `kill-process' a command.
;; (put 'kill-process 'interactive-form '(interactive))
(put 'kill-process 'interactive-form
     '(interactive (kill-process-read-arg)))

(defun kill-process-read-arg ()
  "Obtain arguments interactively for `kill-process'."
  ;; Currently supports only the PROCESS argument.
  ;; Must either return a list containing a process, or signal an error.
  ;; (Returning `nil' would mean the current buffer's process.)
  (unless (fboundp 'process-list)
    (error "Asynchronous subprocesses are not supported on this system"))
  ;; Local function to return cons of a complete-able name, and the
  ;; associated process object, for use with `completing-read'.
  (cl-flet ((procitem
             (p) (when (process-live-p p)
                   (let ((pid (process-id p))
                         (procname (process-name p))
                         (procbuf (process-buffer p)))
                     (and (eq (process-type p) 'real)
                          (cons (if procbuf
                                    (format "%s (%s) in buffer %s"
                                            procname pid
                                            (buffer-name procbuf))
                                  (format "%s (%s)" procname pid))
                                p))))))
    ;; Perform `completing-read' for a process.
    (let* ((currproc (get-buffer-process (current-buffer)))
           (proclist (or (process-list) (error "No processes found")))
           (collection (delq nil (mapcar #'procitem proclist)))
           (selection (completing-read
                       (if (and currproc (eq (process-type currproc) 'real))
                           (format "Kill process? (default %S (%s)): "
                                   currproc (process-id currproc))
                         "Kill process: ")
                       collection nil :require-match nil nil
                       (car (cl-find currproc collection :key #'cdr))))
           (process (and selection
                         (cdr (assoc selection collection)))))
      (unless process
        (error "No process selected"))
      ;; Return list of arguments for `kill-process'.
      (if (y-or-n-p (format "Kill %S? " process))
          (list process)
        (error "Process not killed")))))

--------------CDEE2D066AC229EE3620A37B--




Acknowledgement sent to Phil Sainty <psainty@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#32640; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

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