emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/helm 4360be80f9 1/3: Show process-command in emacs process


From: ELPA Syncer
Subject: [nongnu] elpa/helm 4360be80f9 1/3: Show process-command in emacs process-list
Date: Mon, 8 Aug 2022 03:58:38 -0400 (EDT)

branch: elpa/helm
commit 4360be80f99bd793a576e5c51faacf3799cdb774
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Show process-command in emacs process-list
---
 helm-sys.el | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/helm-sys.el b/helm-sys.el
index 39945574f4..57b1c8d12e 100644
--- a/helm-sys.el
+++ b/helm-sys.el
@@ -416,6 +416,19 @@ Show actions only on line starting by a PID."
             (let (tabulated-list-use-header-line)
               (list-processes--refresh)))
     :candidates (lambda () (mapcar #'process-name (process-list)))
+    :candidate-transformer
+    (lambda (candidates)
+      (cl-loop for c in candidates
+               for command = (mapconcat
+                              'identity
+                              (process-command (get-process c)) " ")
+               if (and command (not (string= command ""))) collect
+               (cons (concat c " --> "
+                              (mapconcat 'identity
+                                         (process-command (get-process c)) " 
"))
+                     c)
+               else collect c))
+    :multiline t
     :persistent-action (lambda (elm)
                          (delete-process (get-process elm))
                          (helm-delete-current-selection))
@@ -443,7 +456,9 @@ Show actions only on line starting by a PID."
 (defun helm-list-emacs-process ()
   "Preconfigured `helm' for Emacs process."
   (interactive)
-  (helm-other-buffer 'helm-source-emacs-process "*helm process*"))
+  (helm :sources 'helm-source-emacs-process
+        :truncate-lines t
+        :buffer "*helm process*"))
 
 ;;;###autoload
 (defun helm-xrandr-set ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]