From 12f7116714cf0cc3566ea2a5b1184c99cbfe7b90 Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Mon, 13 Aug 2018 19:22:49 +0900 Subject: [PATCH] Ibuffer: Detect correctly the buffers running a process * lisp/ibuffer.el (filename-and-process): Store the process buffer as a text property; check for such property to detect a buffer with a process (Bug#32420). --- lisp/ibuffer.el | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 0a7bfe00a98..03018d08a58 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -1912,11 +1912,9 @@ If point is on a group name, this function operates on that group." (let ((procs 0) (files 0)) (dolist (string strings) - (if (string-match "\\(?:\\`([[:ascii:]]+)\\)" string) - (progn (setq procs (1+ procs)) - (if (< (match-end 0) (length string)) - (setq files (1+ files)))) - (setq files (1+ files)))) + (when (get-text-property 1 'ibuffer-process string) + (setq procs (1+ procs))) + (setq files (1+ files))) (concat (cond ((zerop files) "No files") ((= 1 files) "1 file") (t (format "%d files" files))) @@ -1928,7 +1926,8 @@ If point is on a group name, this function operates on that group." (filename (ibuffer-make-column-filename buffer mark))) (if proc (concat (propertize (format "(%s %s)" proc (process-status proc)) - 'font-lock-face 'italic) + 'font-lock-face 'italic + 'ibuffer-process proc) (if (> (length filename) 0) (format " %s" filename) "")) -- 2.39.2