[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 12f7116 1/2: Ibuffer: Detect correctly the buffer
From: |
Tino Calancha |
Subject: |
[Emacs-diffs] emacs-26 12f7116 1/2: Ibuffer: Detect correctly the buffers running a process |
Date: |
Mon, 13 Aug 2018 06:25:25 -0400 (EDT) |
branch: emacs-26
commit 12f7116714cf0cc3566ea2a5b1184c99cbfe7b90
Author: Tino Calancha <address@hidden>
Commit: Tino Calancha <address@hidden>
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 0a7bfe0..03018d0 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)
""))