emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#32420: closed (26.1.50; Ibuffer: Detect correctly


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#32420: closed (26.1.50; Ibuffer: Detect correctly the buffers running a process)
Date: Mon, 13 Aug 2018 10:31:01 +0000

Your message dated Mon, 13 Aug 2018 19:30:30 +0900
with message-id <address@hidden>
and subject line Re: bug#32420: 26.1.50; Ibuffer: Detect correctly the buffers 
running a process
has caused the debbugs.gnu.org bug report #32420,
regarding 26.1.50; Ibuffer: Detect correctly the buffers running a process
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
32420: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=32420
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 26.1.50; Ibuffer: Detect correctly the buffers running a process Date: Sun, 12 Aug 2018 01:48:22 +0900
emacs -Q
M-x info RET
m Emacs RET
M-x ibuffer RET
;; Ibuffer wrongly reports *info* buffer as running a process.
--8<-----------------------------cut here---------------start------------->8---
commit db8f778c98bd6eb8db7b16239f6fddab012e5314
Author: Tino Calancha <address@hidden>
Date:   Sun Aug 12 01:38:03 2018 +0900

    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 0a7bfe00a9..03018d08a5 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -1912,11 +1912,9 @@ filename-and-process
      (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 @@ filename-and-process
        (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)
                  ""))
--8<-----------------------------cut here---------------end--------------->8---

In GNU Emacs 26.1.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
 of 2018-08-11
Repository revision: ec6f588940e51013435408a456c10d33ddf98fb2
Windowing system distributor 'The X.Org Foundation', version 11.0.11902000
System Description:     Debian GNU/Linux 9.5 (stretch)



--- End Message ---
--- Begin Message --- Subject: Re: bug#32420: 26.1.50; Ibuffer: Detect correctly the buffers running a process Date: Mon, 13 Aug 2018 19:30:30 +0900 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
Eli Zaretskii <address@hidden> writes:

>> From: Tino Calancha <address@hidden>
>> Date: Sun, 12 Aug 2018 17:21:36 +0900 (JST)
>> cc: Tino Calancha <address@hidden>, address@hidden
>> 
>> > Ah, okay.  So, to fix this, isn't it better to see if the current
>> > buffer is a process-buffer of some process in process-list?
>> It's a bit tricky code.
>
> Then maybe it's high time to redesign it ;-)
I need to talk with my manager: she organize my agenda with that stuff.
> But don't let that hold your fix.
Fixed in emacs-26 branch as commit
'Ibuffer: Detect correctly the buffers running a process'
(12f7116714cf0cc3566ea2a5b1184c99cbfe7b90)


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]