diff options
| author | Tino Calancha | 2018-08-13 19:22:49 +0900 |
|---|---|---|
| committer | Tino Calancha | 2018-08-13 19:22:49 +0900 |
| commit | 12f7116714cf0cc3566ea2a5b1184c99cbfe7b90 (patch) | |
| tree | 66e166e27224e6af3af64328f682f72651e3f953 | |
| parent | 184229766f9c009119c986a255f2e9f7455c30af (diff) | |
| download | emacs-12f7116714cf0cc3566ea2a5b1184c99cbfe7b90.tar.gz emacs-12f7116714cf0cc3566ea2a5b1184c99cbfe7b90.zip | |
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).
| -rw-r--r-- | lisp/ibuffer.el | 11 |
1 files 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." | |||
| 1912 | (let ((procs 0) | 1912 | (let ((procs 0) |
| 1913 | (files 0)) | 1913 | (files 0)) |
| 1914 | (dolist (string strings) | 1914 | (dolist (string strings) |
| 1915 | (if (string-match "\\(?:\\`([[:ascii:]]+)\\)" string) | 1915 | (when (get-text-property 1 'ibuffer-process string) |
| 1916 | (progn (setq procs (1+ procs)) | 1916 | (setq procs (1+ procs))) |
| 1917 | (if (< (match-end 0) (length string)) | 1917 | (setq files (1+ files))) |
| 1918 | (setq files (1+ files)))) | ||
| 1919 | (setq files (1+ files)))) | ||
| 1920 | (concat (cond ((zerop files) "No files") | 1918 | (concat (cond ((zerop files) "No files") |
| 1921 | ((= 1 files) "1 file") | 1919 | ((= 1 files) "1 file") |
| 1922 | (t (format "%d files" files))) | 1920 | (t (format "%d files" files))) |
| @@ -1928,7 +1926,8 @@ If point is on a group name, this function operates on that group." | |||
| 1928 | (filename (ibuffer-make-column-filename buffer mark))) | 1926 | (filename (ibuffer-make-column-filename buffer mark))) |
| 1929 | (if proc | 1927 | (if proc |
| 1930 | (concat (propertize (format "(%s %s)" proc (process-status proc)) | 1928 | (concat (propertize (format "(%s %s)" proc (process-status proc)) |
| 1931 | 'font-lock-face 'italic) | 1929 | 'font-lock-face 'italic |
| 1930 | 'ibuffer-process proc) | ||
| 1932 | (if (> (length filename) 0) | 1931 | (if (> (length filename) 0) |
| 1933 | (format " %s" filename) | 1932 | (format " %s" filename) |
| 1934 | "")) | 1933 | "")) |