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).
This commit is contained in:
Tino Calancha 2018-08-13 19:22:49 +09:00
parent 184229766f
commit 12f7116714

View file

@ -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)
""))