From: Tino Calancha Date: Mon, 13 Aug 2018 10:22:49 +0000 (+0900) Subject: Ibuffer: Detect correctly the buffers running a process X-Git-Tag: emacs-26.1.90~204 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=12f7116714cf0cc3566ea2a5b1184c99cbfe7b90;p=emacs.git 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). --- 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) ""))