[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#32420: 26.1.50; Ibuffer: Detect correctly the buffers running a proc
From: |
Tino Calancha |
Subject: |
bug#32420: 26.1.50; Ibuffer: Detect correctly the buffers running a process |
Date: |
Sun, 12 Aug 2018 17:21:36 +0900 (JST) |
User-agent: |
Alpine 2.20 (DEB 67 2015-01-07) |
How do you see it reporting a process? What I see is that it reports
a pseudo-file for it. Am I missing something?
Attached 1 picture.
It shows at the bottom the line:
3 buffers 2515909 1 file, 1 process
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.
When such thing run, the summarizer, I believe the current buffer
is *Ibuffer*; you receive 'strings': they are the rows in
column 'Filename/Process'.
There is no direct way to connect each string with its buffer. The
original code make the assumption that if 'string' matches something like
(foobar)
then it corresponds to a buffer running a process.
That assumption is wrong, for instance, in several info buffers.
Because you first create all columns, and the summarizer runs at the end,
I thought is simple to add the process as a text property for those
buffers having a process. Then you don't need any assumption on 'string':
you just check whether if 'string' has a property 'ibuffer-process' or
not.