unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#21725: 25.0; list-processes dont show process id
@ 2015-10-21  9:30 Tino Calancha
  2015-10-21 16:47 ` Eli Zaretskii
  2016-06-07 19:07 ` Glenn Morris
  0 siblings, 2 replies; 6+ messages in thread
From: Tino Calancha @ 2015-10-21  9:30 UTC (permalink / raw)
  To: 21725

[-- Attachment #1: Type: text/plain, Size: 306 bytes --]


In GNU Emacs 25.0.50 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.23)
  of 2015-10-21

list-processes should show the process id. This is particularly important
for those processes not associated to a buffer: showing a column with
the PID greatly simplify killing those processes when they are not needed.

[-- Attachment #2: Type: text/plain, Size: 1184 bytes --]

diff --git a/lisp/simple.el b/lisp/simple.el
index 8acb683..0ec03f9 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3538,6 +3538,7 @@ process-menu-mode-map
 (define-derived-mode process-menu-mode tabulated-list-mode "Process Menu"
   "Major mode for listing the processes called by Emacs."
   (setq tabulated-list-format [("Process" 15 t)
+			       ("PID"      7 t)
 			       ("Status"   7 t)
 			       ("Buffer"  15 t)
 			       ("TTY"     12 t)
@@ -3564,6 +3565,7 @@ list-processes--refresh
 	       (process-query-on-exit-flag p))
 	   (let* ((buf (process-buffer p))
 		  (type (process-type p))
+		  (pid  (if (process-id p) (format "%d" (process-id p)) "--"))
 		  (name (process-name p))
 		  (status (symbol-name (process-status p)))
 		  (buf-label (if (buffer-live-p buf)
@@ -3599,7 +3601,7 @@ list-processes--refresh
 					 (format " at %s b/s" speed)
 				       "")))))
 		     (mapconcat 'identity (process-command p) " "))))
-	     (push (list p (vector name status buf-label tty cmd))
+	     (push (list p (vector name pid status buf-label tty cmd))
 		   tabulated-list-entries))))))
 
 (defun process-menu-visit-buffer (button)

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

* bug#21725: 25.0; list-processes dont show process id
  2015-10-21  9:30 bug#21725: 25.0; list-processes dont show process id Tino Calancha
@ 2015-10-21 16:47 ` Eli Zaretskii
  2015-10-22  0:13   ` Constantino Calancha
  2015-10-22  0:58   ` Constantino Calancha
  2016-06-07 19:07 ` Glenn Morris
  1 sibling, 2 replies; 6+ messages in thread
From: Eli Zaretskii @ 2015-10-21 16:47 UTC (permalink / raw)
  To: Tino Calancha; +Cc: 21725

> Date: Wed, 21 Oct 2015 18:30:43 +0900 (JST)
> From: Tino Calancha <f92capac@gmail.com>
> 
> list-processes should show the process id. This is particularly important
> for those processes not associated to a buffer: showing a column with
> the PID greatly simplify killing those processes when they are not needed.

Thank you for your contribution.

However, wouldn't it be better to provide a key binding in the buffer
that shows the processes that would kill the process shown on the
current line?  A possible key could be "C-c C-\", for example.  This
sounds like an easier way than first looking up the PID, the killing
the process by PID.  WDYT?





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

* bug#21725: 25.0; list-processes dont show process id
  2015-10-21 16:47 ` Eli Zaretskii
@ 2015-10-22  0:13   ` Constantino Calancha
  2015-10-22  0:58   ` Constantino Calancha
  1 sibling, 0 replies; 6+ messages in thread
From: Constantino Calancha @ 2015-10-22  0:13 UTC (permalink / raw)
  To: 21725


Sure, i wish such functionality since long time ago.
It think a non GNU emacs library list-processes+.el, add
such functionality. I have never tried such library.
I will take a look when i have time, but
not sure if i will be skillfull enough.


On Thu, 22 Oct 2015 01:47:24 +0900, Eli Zaretskii <eliz@gnu.org> wrote:

>> Date: Wed, 21 Oct 2015 18:30:43 +0900 (JST)
>> From: Tino Calancha <f92capac@gmail.com>
>>
>> list-processes should show the process id. This is particularly  
>> important
>> for those processes not associated to a buffer: showing a column with
>> the PID greatly simplify killing those processes when they are not  
>> needed.
>
> Thank you for your contribution.
>
> However, wouldn't it be better to provide a key binding in the buffer
> that shows the processes that would kill the process shown on the
> current line?  A possible key could be "C-c C-\", for example.  This
> sounds like an easier way than first looking up the PID, the killing
> the process by PID.  WDYT?





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

* bug#21725: 25.0; list-processes dont show process id
  2015-10-21 16:47 ` Eli Zaretskii
  2015-10-22  0:13   ` Constantino Calancha
@ 2015-10-22  0:58   ` Constantino Calancha
  1 sibling, 0 replies; 6+ messages in thread
From: Constantino Calancha @ 2015-10-22  0:58 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 21725

`
I have realized that emacs25 already introduces a function
`process-menu-delete-process', deleting the processes at point,
and bind "d" to this function. Nice improvement!

Even if we can easily delete all the process, it would be natural
to show one column with the process IDs as i did in the patch.

On Thu, 22 Oct 2015 01:47:24 +0900, Eli Zaretskii <eliz@gnu.org> wrote:

>> Date: Wed, 21 Oct 2015 18:30:43 +0900 (JST)
>> From: Tino Calancha <f92capac@gmail.com>
>>
>> list-processes should show the process id. This is particularly  
>> important
>> for those processes not associated to a buffer: showing a column with
>> the PID greatly simplify killing those processes when they are not  
>> needed.
>
> Thank you for your contribution.
>
> However, wouldn't it be better to provide a key binding in the buffer
> that shows the processes that would kill the process shown on the
> current line?  A possible key could be "C-c C-\", for example.  This
> sounds like an easier way than first looking up the PID, the killing
> the process by PID.  WDYT?





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

* bug#21725: 25.0; list-processes dont show process id
  2015-10-21  9:30 bug#21725: 25.0; list-processes dont show process id Tino Calancha
  2015-10-21 16:47 ` Eli Zaretskii
@ 2016-06-07 19:07 ` Glenn Morris
  2016-10-17  7:49   ` Eli Zaretskii
  1 sibling, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2016-06-07 19:07 UTC (permalink / raw)
  To: 21725-done

Version: 25.2

Thanks; applied.





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

* bug#21725: 25.0; list-processes dont show process id
  2016-06-07 19:07 ` Glenn Morris
@ 2016-10-17  7:49   ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2016-10-17  7:49 UTC (permalink / raw)
  To: 21725

> From: Glenn Morris <rgm@gnu.org>
> Date: Tue, 07 Jun 2016 15:07:27 -0400
>
> Version: 25.2
>
> Thanks; applied.

This doesn't seem to be a bug at all, so it should have been applied
to master, not the release branch.  Am I missing something?

Thanks.





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

end of thread, other threads:[~2016-10-17  7:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-21  9:30 bug#21725: 25.0; list-processes dont show process id Tino Calancha
2015-10-21 16:47 ` Eli Zaretskii
2015-10-22  0:13   ` Constantino Calancha
2015-10-22  0:58   ` Constantino Calancha
2016-06-07 19:07 ` Glenn Morris
2016-10-17  7:49   ` Eli Zaretskii

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